The function for parsing the vcard email addresses.

        Args:
            val (:obj:`list`): The value to parse.
185027
def _parse_email(self, val):
        

        ret = {
            'type': None,
            'value': None
        }

        try:

            ret['type'] = val[1]['type']

        except (KeyError, ValueError, TypeError):

                pass

        ret['value'] = val[3].strip()

        try:

            self.vars['email'].append(ret)

        except AttributeError:

            self.vars['email'] = []
            self.vars['email'].append(ret)
690636
def _parse_text(val, **options):
    
    if val and options.get("ac_parse_value", False):
        return anyconfig.parser.parse_single(val)

    return val
894658
def dump_edn_val(v):
  " "
  if isinstance(v, (str, unicode)): 
    return json.dumps(v)
  elif isinstance(v, E):            
    return unicode(v)
  else:                             
    return dumps(v)
330294
def _eval(val, onts, mdb_safe):
    
    if isinstance(val, six.string_types):
        val = val.strip()
        if not val:
            return None
        else:
            return val
    elif isinstance(val, dict) or isinstance(val, SamlBase):
        return to_dict(val, onts, mdb_safe)
    elif isinstance(val, list):
        lv = []
        for v in val:
            if isinstance(v, dict) or isinstance(v, SamlBase):
                lv.append(to_dict(v, onts, mdb_safe))
            else:
                lv.append(v)
        return lv
    return val
71425
def CSVofIntegers(msg=None):
    '''
    
    '''
    def fn(value):
        try:
            if isinstance(value, basestring):
                if ',' in value:
                    value = list(map(
                        int, filter(
                            bool, list(map(
                                lambda x: x.strip(), value.split(',')
                            ))
                        )
                    ))
                    return value
                else:
                    return [int(value)]
            else:
                raise ValueError
        except ValueError:
            raise Invalid(
                '<{0}> is not a valid csv of integers'.format(value)
            )
    return fn
625059
function parse (val) {
  assert(exists(val), 'Invalid date: ' + val)
  var date = new Date(val)
  assert(!isNaN(date.valueOf()), 'Invalid date: ' + val)
  return date
}
542404
def parse(self):
        
        data = json.loads(sys.argv[1])
        self.config_path = self.decode(data['config_path'])
        self.subject = self.decode(data['subject'])
        self.text = self.decode(data['text'])
        self.html = self.decode(data['html'])
        self.send_as_one = data['send_as_one']
        if 'files' in data:
            self.parse_files(data['files'])
        self.ccs = data['ccs']
        self.addresses = data['addresses']
        if not self.addresses:
            raise ValueError(
                'Atleast one email address is required to send an email')
275526
def _check_for_parsable_text(self, val):
        
        if isinstance(val, ParsableText):
            return val.original_content()
        if isinstance(val, list):
            for key, val2 in enumerate(val):
                val[key] = self._check_for_parsable_text(val2)
            return val
        if isinstance(val, dict):
            for key, val2 in val.items():
                val[key] = self._check_for_parsable_text(val2)
        return val
844076
def _extract_values(values_list):
        
        values = []
        # check if file or list of values to iterate
        if isinstance(values_list, str):
            with open(values_list) as ff:
                reading = csv.reader(ff)
                for j in reading:
                    values.append(j[0])
        elif isinstance(values_list, list):
            values = values_list
        else:
            raise Exception("input datatype not supported.")
        return values
1215599
def validate_comma_separated_emails(value):
    
    if not isinstance(value, (tuple, list)):
        raise ValidationError('Email list must be a list/tuple.')

    for email in value:
        try:
            validate_email_with_name(email)
        except ValidationError:
            raise ValidationError('Invalid email: %s' % email, code='invalid')
763548
def into(self, val: str) -> Union['ApiNode', 'ApiEndpoint']:
        """"""
        if val in self.paths:
            return self.paths[val]
        if self.param:
            return self.param
        raise IndexError(_("Value {} is missing from api").format(val))
1107289
function parseSrv(val, msg) {
  val.priority = msg.readUInt16BE();
  val.weight = msg.readUInt16BE();
  val.port = msg.readUInt16BE();
  val.target = nameUnpack(msg);
  return PARSE_RESOURCE_DONE;
}
377935
def parse_value(val):
    
    
    mobj = re.match('(-{0,1}\d+)\s*(\sseconds|/\s*\w+)$',  val)
    if mobj:
        return int(mobj.group(1))
    mobj = re.match('(-{0,1}\d*\.\d+)\s*(\sseconds|/\s*\w+)$',  val)
    if mobj:
        return float(mobj.group(1))
    re.match('(-{0,1}\d+)\s*([GMK])B$',  val)
    if mobj:
        return int(mobj.group(1)) * memMultiplier[mobj.group(2)]
    mobj = re.match('(-{0,1}\d+(\.\d+){0,1})\s*\%$',  val)
    if mobj:
        return float(mobj.group(1)) / 100 
    return val
1100446
def parse_value(type: str, val: str):
    
    if type.upper() in PARSER_MAP:
        #prep_val = prepare_value(val)
        out = PARSER_MAP[type](val)
        log.debug('For {} entered {}, got {} out'.format(type, val, out))
        return out
    else:
        raise ObdPidParserUnknownError(type, val)
357804
def peek_step(self, val: ArrayValue,
                  sn: "DataNode") -> Tuple[Value, "DataNode"]:
        
        try:
            return (val[val.index(self.parse_value(sn))], sn)
        except ValueError:
            return None, sn
268654
def _val_to_store_info(self, val):
        
        if isinstance(val, str):
            return val, 0
        elif isinstance(val, int):
            return "%d" % val, Client._FLAG_INTEGER
        elif isinstance(val, long):
            return "%d" % val, Client._FLAG_LONG
        return pickle.dumps(val, protocol=pickle.HIGHEST_PROTOCOL), Client._FLAG_PICKLE
950125
def _process_param_value(self, value):
        
        # Extract IDs from objects
        if isinstance(value, TroveboxObject):
            return str(value.id).encode('utf-8')

        # Ensure strings are UTF-8 encoded
        elif isinstance(value, TEXT_TYPE):
            return value.encode("utf-8")

        # Handle lists
        elif isinstance(value, list):
            # Make a copy of the list, to avoid overwriting the original
            new_list = list(value)
            # Process each item in the list
            for i, item in enumerate(new_list):
                new_list[i] = self._process_param_value(item)
            # new_list elements are UTF-8 encoded strings - simply join up
            return b','.join(new_list)

        # Handle booleans
        elif isinstance(value, bool):
            return b"1" if value else b"0"

        # Unknown - just do our best
        else:
            return str(value).encode("utf-8")