def obj_for(self, obj_or_name: Union[str, Element]) -> Optional[Union[str, Element]]:
name = obj_or_name.name if isinstance(obj_or_name, Element) else obj_or_name<EOL>return self.schema.classes[name] if name in self.schema.classeselse self.schema.slots[name] if name in self.schema.slotselse self.schema.types[name] if name in self.schema.types else name if name in builtin_nameselse None<EOL>
Return the class, slot or type that represents name or name itself if it is a builtin

        @param obj_or_name: Object or name
        @return: Corresponding element or None if not found (most likely cause is that it is a builtin type)