code: def resolve(str_or_obj):
      
      from rope.base.utils.pycompat import string_types
      if not isinstance(str_or_obj, string_types):
          return str_or_obj
      if '.' not in str_or_obj:
          str_or_obj += '.'
      mod_name, obj_name = str_or_obj.rsplit('.', 1)
      __import__(mod_name)
      mod = sys.modules[mod_name]
      return getattr(mod, obj_name) if obj_name else mod
docs: Returns object from string