<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, vimtype, name, folder=None):
 """ Return an object by name, if name is None the first found object is returned """

        obj = None
        content = self.service_instance.RetrieveContent()

        if folder is None:
            folder = content.rootFolder

        container = content.viewManager.CreateContainerView(folder, [vimtype], True)
        for c in container.view:
            if c.name == name:
                obj = c
                break

        container.Destroy()
        return obj