code: def __remote_path_rewrite(self, dataset_path, dataset_path_type, name=None):
          
          path = str(dataset_path)  # Use false_path if needed.
          action = self.action_mapper.action(path, dataset_path_type)
          if action.staging_needed:
              if name is None:
                  name = os.path.basename(path)
              remote_directory = self.__remote_directory(dataset_path_type)
              remote_path_rewrite = self.path_helper.remote_join(remote_directory, name)
          else:
              # Actions which don't require staging MUST define a path_rewrite
              # method.
              remote_path_rewrite = action.path_rewrite(self.path_helper)
  
          return remote_path_rewrite
docs: Return remote path of this file (if staging is required) else None.