<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_obj(self, content, vimtype, name):
 """ Return an object by name for a specific type, if name is None the first found object is returned :param content: pyvmomi content object :param vimtype: the type of object too search :param name: the object name to return """

        obj = None

        container = self._get_all_objects_by_type(content, vimtype)

        # If no name was given will return the first object from list of a objects matching the given vimtype type
        for c in container.view:
            if name:
                if  c.name == name:
                    obj = c
                    break
            else:
                obj = c
                break

        return obj