code: def _format_resolution_output(path, project, folderpath, entity_name, result):
      
      try:
          if len(result) == 0:
              folder = _resolve_folder(project, folderpath, entity_name)
              return {"project": project, "folder": folder, "name": None}
          else:
              validated_results = _validate_resolution_output_length(path, entity_name, result)
              return {"project": None if is_job_id(project) else project,
                      "folder": None, "name": validated_results}
      except ResolutionError:
          return {"project": None, "folder": None, "name": None}
docs: :param path: Path to the object that required resolution; propagated from
                   command-line
      :type path: string
      :param project: The potential project the entity belongs to
      :type project: string
      :param folderpath: Path to the entity
      :type folderpath: string
      :param entity_name: The name of the entity
      :type entity_name: string
      :param result: The result of resolving entity_name
      :type result: list of dictionaries
      :returns: The validated resolution output
      :rtype: dictionary
  
      Formats the output from the resolution of entity_name based on the number
      of resolved entities.
  
      If no results are found and entity_name can be resolved to a folder, then
      the return value will look like:
      {"project": <project>, "folder": <folder>, "name": None}
  
      If exactly one result is found, then the return value will look like:
      {"project": <project>, "folder": <folder>, "name": {"id": <id>,
                                                          "project": <project>}}
      OR
      {"project": None, "folder": <folder>, "name": {"id": <id>,
                                                     "project": <project>}}
  
      Else, the return value will look like:
      {"project": None, "folder": None, "name": None}