code: def require_remote_ref_path(func):
      
  
      def wrapper(self, *args):
          if not self.is_remote():
              raise ValueError("ref path does not point to a remote reference: %s" % self.path)
          return func(self, *args)
      # END wrapper
      wrapper.__name__ = func.__name__
      return wrapper
docs: A decorator raising a TypeError if we are not a valid remote, based on the path