<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process_obj(self, obj: Union[URIRef, Literal, str]) -> Union[URIRef, Literal]: """ Gives component the proper node type Args: obj: Entity object to be converted to its appropriate node type Returns: URIRef or Literal type of the object provided. Raises: SystemExit: If object is a dict or list it becomes str with broken data. Needs to come in one object at a time. """

        if isinstance(obj, dict) or isinstance(obj, list):
            exit(str(obj) + ': should be str or intended to be a URIRef or Literal.')

        if isinstance(obj, Literal) or isinstance(obj, URIRef):
            prefix = self.find_prefix(obj)
            if prefix: self.process_prefix(prefix)
            return obj

        if len(obj) > 8:
            if 'http' == obj[:4] and '://' in obj and ' ' not in obj:
                prefix = self.find_prefix(obj)
                if prefix: self.process_prefix(prefix)
                return URIRef(obj)

        if ':' in str(obj):
            presumed_prefix, info = obj.split(':', 1)
            namespace: Union[Namespace, None] = self.process_prefix(presumed_prefix)
            if namespace: return namespace[info]

        return Literal(obj)