def obj_name(self, obj: Union[str, Element]) -> str:
if isinstance(obj, str):<EOL><INDENT>obj = self.obj_for(obj)<EOL><DEDENT>if isinstance(obj, SlotDefinition):<EOL><INDENT>return underscore(self.aliased_slot_name(obj))<EOL><DEDENT>else:<EOL><INDENT>return camelcase(obj if isinstance(obj, str) else obj.name)<EOL><DEDENT>
Return the formatted name used for the supplied definition