Get model alias if class then convert to alias string
495978
def get_model_alias(self, model_alias):
        """"""
        from trionyx.models import BaseModel
        if inspect.isclass(model_alias) and issubclass(model_alias, BaseModel):
            config = models_config.get_config(model_alias)
            return '{}.{}'.format(config.app_label, config.model_name)
        return model_alias
1209441
public String getClassAlias(Class clazz) {
        if (clazz == null)
            return null;

        TypeEncoder<?, U> encoder = classMapping.get(clazz);
        if (encoder != null)
            return encoder.getAlias();

        return null;
    }
915085
def class_reference_from_action_alias(method_sym)
      alias_found = find_alias(method_sym.to_s)
      return nil unless alias_found

      class_reference_from_action_name(alias_found.to_sym)
    end
468865
def find_formatter_class(alias):
    
    for module_name, name, aliases, _, _ in itervalues(FORMATTERS):
        if alias in aliases:
            if name not in _formatter_cache:
                _load_formatters(module_name)
            return _formatter_cache[name]
    for _, cls in find_plugin_formatters():
        if alias in cls.aliases:
            return cls
425867
public String getAlias(Object obj) {
        if (obj == null)
            return null;

        return getClassAlias(obj.getClass());
    }
365582
def class_name(self, cls, parts=0, aliases=None):
        # type: (Any, int, Optional[Dict[unicode, unicode]]) -> unicode
        
        module = cls.__module__
        if module in ('__builtin__', 'builtins'):
            fullname = cls.__name__
        else:
            fullname = '%s.%s' % (module, cls.__name__)
        if parts == 0:
            result = fullname
        else:
            name_parts = fullname.split('.')
            result = '.'.join(name_parts[-parts:])
        if aliases is not None and result in aliases:
            return aliases[result]
        return result
632047
def aliasstr(self):
		''''''
		return ', '.join(repr(self.ns + x) for x in self.aliases)
1020382
def _get_object_class(cls, class_name):
        

        class_name = class_name.lstrip(cls.__STRING_FORMAT_UNDERSCORE)

        if class_name in cls._override_field_map:
            class_name = cls._override_field_map[class_name]

        try:
            return getattr(endpoint, class_name)
        except AttributeError:
            pass

        try:
            return getattr(object_, class_name)
        except AttributeError:
            pass

        raise BunqException(cls._ERROR_MODEL_NOT_FOUND.format(class_name))
497314
def save_intrinsic_alias(module):
    
    for v in module.values():
        if isinstance(v, dict):  # Submodules case
            save_intrinsic_alias(v)
        else:
            IntrinsicAliases[v] = frozenset((v,))
            if isinstance(v, Class):
                save_intrinsic_alias(v.fields)
119013
def _get_pants_target_alias(self, pants_target_type):
    """"""
    if pants_target_type in self.target_aliases_map:
      return self.target_aliases_map.get(pants_target_type)
    else:
      return "{}.{}".format(pants_target_type.__module__, pants_target_type.__name__)
824795
def get_class(self, module, class_name):
        """"""
        # let's get the class
        class_object = getattr(module, class_name, None)
        if not class_object or not issubclass(class_object, Controller):
            class_object = None

        return class_object
135583
function getAliases(obj) {
  var names = {};
  if (obj.name) {
    names[obj.name] = true;
  }
  var aliases = obj.aliases;
  var i, l;
  for (i = 0, l = aliases.length; i < l; i++) {
    names[aliases[i]] = true;
  }
  return Object.keys(names);
}
331392
public function getModelClassname($alias)
    {
        if (empty($this->_models[$alias])) {
            throw new Exception("Shared model '{$alias}' not found in configuration of module " . static::className());
        }
        return $this->_models[$alias];
    }
610096
def class_to_str(obj):
    
    mod_str = obj.__module__
    name_str = obj.__name__
    if mod_str == '__main__':
        return name_str
    else:
        return '.'.join([mod_str, name_str])
1242616
def get_alias(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.get_alias(index=self._name, **kwargs)
653193
def _get_serializable_model(cls):
        
        current_class = cls
        while current_class._meta.proxy:
            current_class = current_class._meta.proxy_for_model
        return current_class
1112459
def get_field(name, model=None):
    
    if '.' in name:
        m, name = name.split('.')
        model = get_model(m)

    if model:
        return getattr(model, name, None)