code: def v1File_to_dict(f: bindings.v1File) -> Dict[str, Any]:
      d = {
          "path": f.path,
          "type": f.type,
          "uid": f.uid,
          "gid": f.gid,
          # Echo API expects int-type int64 value
          "mtime": int(f.mtime),
          "mode": f.mode,
      }
      if f.type in (ord(tarfile.REGTYPE), ord(tarfile.DIRTYPE)):
          d["content"] = f.content
      return d
  
file_path: determined/harness/determined/common/v1file_utils.py
imports: import base64
  import pathlib
  import tarfile
  from typing import Any, Dict
  from determined.common.api import bindings
label_desc: Use image node_id 2 for calling a global function with example usage: v1File_to_dict(f) and returns: d