:param name:
        :type name: str
433543
def guessFormat(self, name):
        
        name = name.lower()
        generator = self.generator
        if re.findall(r'^is[_A-Z]', name): return lambda x:generator.boolean()
        if re.findall(r'(_a|A)t$', name): return lambda x:generator.dateTime()

        if name in ('first_name','firstname'): return lambda x: generator.firstName()
        if name in ('last_name','lastname'): return lambda x: generator.lastName()

        if name in ('username','login','nickname'): return lambda x:generator.userName()
        if name in ('email','email_address'): return lambda x:generator.email()
        if name in ('phone_number','phonenumber','phone'): return lambda x:generator.phoneNumber()
        if name == 'address' : return lambda x:generator.address()
        if name == 'city' : return lambda x: generator.city()
        if name == 'streetaddress' : return lambda x: generator.streetaddress()
        if name in ('postcode','zipcode'): return lambda x: generator.postcode()
        if name == 'state' : return lambda x: generator.state()
        if name == 'country' : return lambda x: generator.country()
        if name == 'title' : return lambda x: generator.sentence()
        if name in ('body','summary', 'description'): return lambda x: generator.text()
157284
function(name, type) {
        type = type || 'Module';
        if (typeof name === 'string') {
            name = name.replace(/\-([a-zA-Z0-9])/, function(match, ref) {
                return ref.toUpperCase();
            })
                .replace(new RegExp('$|' + type + '$', 'i'), type);
        }
        return name;
    }
110425
def get_attribute(self, name):
        
        assert isinstance(name, compat.str_type)
        return self.__attributes.get(name)
1057338
def create_name_and_type(self, name: str, descriptor: str) -> NameAndType:
        
        self.append((
            12,
            self.create_utf8(name).index,
            self.create_utf8(descriptor).index
        ))
        return self.get(self.raw_count - 1)
309503
def setMimeTypeByName(self, name):
        "  "
        mimetype = mimetypes.guess_type(name)[0]
        if mimetype is not None:
            self.mimetype = mimetypes.guess_type(name)[0].split(";")[0]
465590
def from_type_name(cls, typ, name):
        """"""
        # Try aliases first.
        for k, nt in cls.defined_aliases.items():
            if typ is not None and typ != nt.type: continue
            #print(name, nt.name)
            if name == nt.name:
                if len(k) == 1: return cls(xc=k)
                if len(k) == 2: return cls(x=k[0], c=k[1])
                raise ValueError("Wrong key: %s" % k)

        # At this point, we should have something in the form
        # name="GGA_X_PBE+GGA_C_PBE" or  name=""LDA_XC_TETER93"
        if "+" in name:
            #if typ is not None: raise ValueError("typ: `%s` but name: `%s`" % (typ, name))
            x, c = (s.strip() for s in name.split("+"))
            x, c = LibxcFunc[x], LibxcFunc[c]
            return cls(x=x, c=c)
        else:
            #if typ is not None: raise ValueError("typ: `%s` but name: `%s`" % (typ, name))
            xc = LibxcFunc[name]
            return cls(xc=xc)

        if typ is None:
            raise ValueError("Cannot find name=%s in defined_aliases" % name)
        else:
            raise ValueError("Cannot find type=%s, name=%s in defined_aliases" % (typ, name))
448607
def _get_type_name(type_):
    # type: (type) -> str
    
    name = repr(type_)
    if name.startswith("<"):
        name = getattr(type_, "__qualname__", getattr(type_, "__name__", ""))
    return name.rsplit(".", 1)[-1] or repr(type_)
1362310
def _setable_get_(name, self):
        ""

        raise AttributeError(
            "'{typename}' object has no attribute '{name}'".format(
                typename=type(self).__name__,
                name=name
            )
        )
1107491
function (name_type) {
		let name = '';
		if (typeof name_type === 'undefined' || name_type === '' || name_type === 'random') {
			// randomize a type...
			name_type = randomizer.rollRandom(Object.keys(namedata.options));
		}
		if (typeof namedata[name_type]['surname'] === 'undefined' || r_helpers.isEmpty(namedata[name_type]['surname'])) {
			return '';
		}
		switch (name_type) {
			case 'holmesian':
				name = holmesname();
				break;
			case 'cornish':
			case 'flemish':
			case 'dutch':
			case 'turkish':
			default:
				name = randomizer.rollRandom(namedata[name_type]['surname']);
				name = randomizer.findToken(name);
				break;
		}
		return capitalizeName(name);
	}
850033
private NameInfo getNameInfoForName(String name, SymbolType type) {
    Map<String, NameInfo> map = type == PROPERTY ? propertyNameInfo : varNameInfo;
    if (map.containsKey(name)) {
      return map.get(name);
    } else {
      NameInfo nameInfo = new NameInfo(name);
      map.put(name, nameInfo);
      symbolGraph.createNode(nameInfo);
      return nameInfo;
    }
  }
381530
def name_from_type(type_):
    # type: (InternalType) -> str
    
    if isinstance(type_, (DictType, ListType, TupleType, SetType, IteratorType)):
        return repr(type_)
    else:
        if type_.__name__ != 'NoneType':
            module = type_.__module__
            if module in BUILTIN_MODULES or module == '<unknown>':
                # Omit module prefix for known built-ins, for convenience. This
                # makes unit tests for this module simpler.
                # Also ignore '<uknown>' modules so pyannotate can parse these types
                return type_.__name__
            else:
                name = getattr(type_, '__qualname__', None) or type_.__name__
                delim = '.' if '.' not in name else ':'
                return '%s%s%s' % (module, delim, name)
        else:
            return 'None'
1300047
def getNamedItem(self, name: str) -> Optional[Attr]:
        
        return self._dict.get(name, None)
1372027
def get_type_data(name):
    
    name = name.upper()
    try:
        return {
            'authority': 'okapia.net',
            'namespace': 'string match types',
            'identifier': name,
            'domain': 'String Match Types',
            'display_name': STRING_MATCH_TYPES[name] + ' String Match Type',
            'display_label': STRING_MATCH_TYPES[name],
            'description': ('The string match type for the ' +
                            STRING_MATCH_TYPES[name])
        }
    except KeyError:
        raise NotFound('String Type: ' + name)
44858
def name(self):
        
        res = type(self).__name__
        if self._id:
            res += ".{}".format(self._id)
        return res
546747
def with_name(self, name):
        """"""
        if not self.name:
            raise ValueError("%r has an empty name" % (self,))
        drv, root, parts = self._flavour.parse_parts((name,))
        if (not name or name[-1] in [self._flavour.sep, self._flavour.altsep]
                or drv or root or len(parts) != 1):
            raise ValueError("Invalid name %r" % (name))
        return self._from_parsed_parts(self._drv, self._root,
                                       self._parts[:-1] + [name])
536044
def type_named(obj, name):
    
    # if obj is a member of the named class, return True
    name = str(name)
    if obj.__class__.__name__ == name:
        return obj.__class__
    for base in type_bases(obj):
        if base.__name__ == name:
            return base
    raise ValueError('Unable to extract class of name ' + name)
281926
def getbyname(self, name):
        
        if name not in self._schbyname:
            raise KeyError('name {0} not registered'.format(name))

        return self._schbyname[name]