Return True if class is defined as the respective model name lookup declaration
979850
def is_model_name_lookup(self, base):
        
        return (
            isinstance(base, ast.Name) and
            base.id == self.model_name_lookup
        )
874218
def method_name_exist(self, meth_name):
        

        methods = self.current_class.get_methods()
        for m in methods:
            if m.name == meth_name:
                return True
        return False
1239341
def is_creation_model(instance, attribute, value):
    """"""

    creation_name = value.get('name')
    if not isinstance(creation_name, str):
        instance_name = instance.__class__.__name__
        err_str = ("'name' must be given as a string in the '{attr}' "
                   "parameter of a '{cls}'. Given "
                   "'{value}'").format(attr=attribute.name,
                                       cls=instance_name,
                                       value=creation_name)
        raise ModelDataError(err_str)
111245
public static boolean isLiveData(SQLiteModelMethod methodDefinition) {
		boolean result = false;

		TypeName returnTypeName = methodDefinition.getReturnClass();
		if (returnTypeName instanceof ParameterizedTypeName) {
			ParameterizedTypeName returnParameterizedTypeName = (ParameterizedTypeName) returnTypeName;
			ClassName returnParameterizedClassName = returnParameterizedTypeName.rawType;
//			Class<?> wrapperClazz;
//			try {
//				wrapperClazz = Class.forName(returnParameterizedClassName.toString());
//			} catch (ClassNotFoundException e) {
//				e.printStackTrace();
//				throw (new KriptonRuntimeException(e));
//			}
//
//			String wrapperName = wrapperClazz.getName();
			if (KriptonLiveDataManager.getInstance().isLiveData(returnParameterizedClassName.toString())) {
				result = true;
			}
		}

		return result;
	}
1240858
def _isdictclass(obj):
    '''
    '''
    c = getattr(obj, '__class__', None)
    return c and c.__name__ in _dict_classes.get(c.__module__, ())
200827
def has_model(self, model):
        
        # TODO:
        # - accept DigitalObject for model?
        # - convert model pid to info:fedora/ form if not passed in that way?
        try:
            rels = self.rels_ext.content
        except RequestFailed:
            # if rels-ext can't be retrieved, confirm this object does not have a RELS-EXT
            # (in which case, it does not subscribe to the specified content model)
            if "RELS-EXT" not in self.ds_list.keys():
                return False
            else:
                raise

        st = (self.uriref, modelns.hasModel, URIRef(model))
        return st in rels
628634
def check_classes(self, scope=-1):
        
        for entry in self[scope].values():
            if entry.class_ is None:
                syntax_error(entry.lineno, "Unknown identifier '%s'" % entry.name)
275889
private static boolean classExists(TypeDef typeDef) {
       try {
        Class.forName(typeDef.getFullyQualifiedName());
        return true;
       } catch (ClassNotFoundException e) {
           return false;
       }
    }
358504
def is_declared(self, name, local_only=False):
        """"""
        if name in self.declared_locally or name in self.declared_parameter:
            return True
        if local_only:
            return False
        return name in self.declared
288206
def has(self, name):
        
        for a in self.all_annotations:
            if a.name == name:
                return True
        return False
87803
def isdefined(obj, force_import=False, namespace=None):
    """"""
    if namespace is None:
        namespace = locals()
    attr_list = obj.split('.')
    base = attr_list.pop(0)
    if len(base) == 0:
        return False
    if base not in builtins.__dict__ and base not in namespace:
        if force_import:
            try:
                module = __import__(base, globals(), namespace)
                if base not in globals():
                    globals()[base] = module
                namespace[base] = module
            except Exception:
                return False
        else:
            return False
    for attr in attr_list:
        try:
            attr_not_found = not hasattr(eval(base, namespace), attr)
        except (SyntaxError, AttributeError):
            return False
        if attr_not_found:
            if force_import:
                try:
                    __import__(base+'.'+attr, globals(), namespace)
                except (ImportError, SyntaxError):
                    return False
            else:
                return False
        base += '.'+attr
    return True
983583
def lookup_class
        ObjectSpace.each_object(Class) do |obj|
          return obj if valid_superclass?(obj) and
                        obj.name.split('::').last == class_name
        end
        raise NameError, "Missing #{class_name} class in #{class_file}"
      end
1296894
def find_model_by_table_name(name):
    """"""

    for model in ModelBase._decl_class_registry.values():
        if hasattr(model, '__table__') and model.__table__.fullname == name:
            return model
    return None
405996
def is_mod_class(mod, cls):
    
    return inspect.isclass(cls) and inspect.getmodule(cls) == mod
260605
function hasDefineAmdReference(ast) {
	var result = false;

	types.visit(ast, {
		visitMemberExpression: function(path) {
			if (this.isDefineAmd(path.node)) {
				result = true;
				this.abort();
			}

			this.traverse(path);
		},

		isDefineAmd: function(node) {
			return (
				n.Identifier.check(node.object) &&
				node.object.name === "define" &&
				n.Identifier.check(node.property) &&
				node.property.name === "amd"
			);
		}
	});

	return result;
}
221398
def class_defined(filename, class_name, superclass_name)
      @definition_graph[filename] ||= {}
      @definition_graph[filename][class_name] = superclass_name
      class_encountered(filename, class_name)
      class_encountered(filename, superclass_name) if superclass_name
    end
666314
def is_models_name_lookup_attribute(self, base):
        
        return (
            isinstance(base, ast.Attribute) and
            isinstance(base.value, ast.Name) and
            base.value.id == 'models' and base.attr == self.model_name_lookup
        )