parameters: (self, object_path)
docstring: :type object_path: ObjectPath
docstring_summary: :type object_path: ObjectPath
docstring_tokens: : type object_path : ObjectPath
function: def get(self, object_path):
          """
          :type object_path: ObjectPath
          """
          if object_path.hostname != "localhost":
              raise NotImplementedError("Unsupported hostname: {:s}".format(str(object_path.hostname)))
          if object_path.instance:
              return TreeClassInstance(self._object_resolver,
                                       object_path.namespace,
                                       object_path.klass,
                                       object_path.instance)
          elif object_path.klass:
              return TreeClassDefinition(self._object_resolver,
                                         object_path.namespace,
                                         object_path.klass)
          elif object_path.namespace:
              return TreeClassDefinition(self._object_resolver,
                                         object_path.namespace)
          else:
              raise RuntimeError("Invalid ObjectPath: {:s}".format(str(object_path)))
function_tokens: def get ( self , object_path ) : if object_path . hostname != "localhost" : raise NotImplementedError ( "Unsupported hostname: {:s}" . format ( str ( object_path . hostname ) ) ) if object_path . instance : return TreeClassInstance ( self . _object_resolver , object_path . namespace , object_path . klass , object_path . instance ) elif object_path . klass : return TreeClassDefinition ( self . _object_resolver , object_path . namespace , object_path . klass ) elif object_path . namespace : return TreeClassDefinition ( self . _object_resolver , object_path . namespace ) else : raise RuntimeError ( "Invalid ObjectPath: {:s}" . format ( str ( object_path ) ) )