code: def import_object_by_string(namespace):
      
      segments = namespace.split('.')
      module = importlib.import_module('.'.join(segments[:-1]))
      return getattr(module, segments[-1])
docs: Import object by complete namespace