code: def _create_entry(entry: dict, source: Source = None) -> dict:
      
      entry["package_name"] = entry["package"].pop("package_name")
      entry["package_version"] = entry["package"].pop("installed_version")
  
      if source:
          entry["index_url"] = source.url
          entry["sha256"] = []
          for item in source.get_package_hashes(entry["package_name"], entry["package_version"]):
              entry["sha256"].append(item["sha256"])
  
      entry.pop("package")
      for dependency in entry["dependencies"]:
          dependency.pop("key", None)
          dependency.pop("installed_version", None)
  
      return entry
docs: Filter and normalize the output of pipdeptree entry.