Convert an ovs-ofctl field name to ryu equivalent.
775700
def ofp_ofctl_field_name_to_ryu(field):
    """"""
    mapped = _OXM_FIELD_OFCTL_ALIASES.get(field)
    if mapped:
        return mapped
    if field.endswith("_dst"):
        mapped = _OXM_FIELD_OFCTL_ALIASES.get(field[:-3] + "src")
        if mapped:
            return mapped[:-3] + "dst"
    return field
253754
def to_foreign(self, obj, name, value):  # pylint:disable=unused-argument
		""""""
		
		namespace = self.namespace
		
		try:
			explicit = self.explicit
		except AttributeError:
			explicit = not namespace
		
		if not isinstance(value, (str, unicode)):
			value = canon(value)
		
		if namespace and ':' in value:  # Try to reduce to a known plugin short name.
			for point in iter_entry_points(namespace):  # TODO: Isolate.
				qualname = point.module_name
				
				if point.attrs:
					qualname += ':' + '.'.join(point.attrs)
				
				if qualname == value:
					value = point.name
					break
		
		if ':' in value:
			if not explicit:
				raise ValueError("Explicit object references not allowed.")
			
			return value
		
		if namespace and value not in (i.name for i in iter_entry_points(namespace)):
			raise ValueError('Unknown plugin "' + value + '" for namespace "' + namespace + '".')
		
		return value
126094
def name(anon, obj, field, val):
    
    return anon.faker.name(field=field)
386908
def _conv_name(x):
    '''
    
    '''
    if '}' in x:
        comps = x.split('}')
        name = comps[1]
        return name
    return x
864884
def makeref2namesdct(name2refdct):
    """"""
    ref2namesdct = {}
    for key, values in name2refdct.items():
        for value in values:
            ref2namesdct.setdefault(value, set()).add(key)
    return ref2namesdct
1050904
def convert_pk_field_names_to_real(model, field_names):
    
    pk_field_names = tuple(f.name for f in model._get_primary_key_columns())

    def append_field(field_name):
        if field_name not in real_field_names:
            real_field_names.append(field_name)

    real_field_names = []
    for name in field_names:
        if name == 'pk':
            for real_pk_field_name in pk_field_names:
                append_field(real_pk_field_name)
        elif name == '-pk':
            for real_pk_field_name in pk_field_names:
                append_field('-' + real_pk_field_name)
        else:
            append_field(name)
    return real_field_names
1280450
def field(self, name_index):
        

        # Transform a name to an index number
        if isinstance(name_index, str):
            status, index = _C.VSfindex(self._id, name_index)
            _checkErr('field', status, "illegal field name: %s" % name_index)
        else:
            n = _C.VFnfields(self._id)
            _checkErr('field', n, 'cannot execute')
            index = name_index
            if index >= n:
                raise HDF4Error("field: illegal index number")
        return VDField(self, index)
901660
def convertafield(field_comm, field_val, field_iddname):
    """"""
    convinidd = ConvInIDD()
    field_typ = field_comm.get('type', [None])[0]    
    conv = convinidd.conv_dict().get(field_typ, convinidd.no_type)
    return conv(field_val, field_iddname)
614178
def varchar(anon, obj, field, val):
    
    return anon.faker.varchar(field=field)
554978
def _fmt_fields(fld_vals, fld2fmt):
    """"""
    vals = []
    for fld, val in fld_vals:
        if fld in fld2fmt:
            val = fld2fmt[fld].format(val)
        vals.append(val)
    return vals
762126
def _field_value_text(self, field):
        """"""
        if field in self.fields:
            return unicode(self.get(field))
        else:
            return self.get_timemachine_instance(field)._object_name_text()
792971
def getfieldnamesendswith(idfobject, endswith):
    """"""
    objls = idfobject.objls
    tmp = [name for name in objls if name.endswith(endswith)]
    if tmp == []:
        pass
    return [name for name in objls if name.endswith(endswith)]
1275627
def _init_pval_name(self, **kws):
        """"""
        if 'pval_name' in kws:
            return kws['pval_name']
        # If go2res contains GO Terms
        if self.is_goterm:
            return "p_{M}".format(M=next(iter(self.go2res.values())).get_method_name())
        # If go2res contains GO namedtuples
        for fld in next(iter(self.go2res.values()))._fields:
            if fld[:2] == 'p_' and fld != 'p_uncorrected':
                return fld
1374146
def _DataClean_(fieldVal):
    

    fieldValNew = fieldVal

    fieldValNew = fieldValNew.upper()

    fieldValNew = fieldValNew.strip()

    fieldValNew = re.sub("[\s\n\t]+", " ", fieldValNew)

    return fieldValNew
654740
def name_to_absolute(x):
    
    for c in ["-", "*", ":"]:
        x = x.replace(c, "_")
    x = x.lower()
    return x
475996
function convertFields (infields) {
  const fields = {}

  _.each(infields, (field) => {
    field.outName = convertFieldName(field.name)
    fields[field.name] = field
  })
  return fields
}
796147
def _get_vcpu_field_and_address(self, field_name, x, y, p):
        """"""
        vcpu_struct = self.structs[b"vcpu"]
        field = vcpu_struct[six.b(field_name)]
        address = (self.read_struct_field("sv", "vcpu_base", x, y) +
                   vcpu_struct.size * p) + field.offset
        pack_chars = b"<" + field.pack_chars
        return field, address, pack_chars