code: def add(
      self, root_path: pathlib.Path, entry_prefix: pathlib.Path
  ) -> None:
      root_path = root_path.resolve()
  
      if not root_path.exists():
          raise ValueError(f"Path '{root_path}' doesn't exist")
  
      if root_path.is_file():
          self.add_v1File(
              v1file_utils.v1File_from_local_file(
                  root_path.name, root_path
              )
          )
          return
  
      if str(entry_prefix) != ".":
          # For non-context directories, include the root directory.
          self.add_v1File(
              v1file_utils.v1File_from_local_dir(
                  str(entry_prefix), root_path
              )
          )
  
      for file in detignore.os_walk_to_v1Files(root_path, entry_prefix):
          self.add_v1File(file)
          self.update_msg()
  
file_path: determined/harness/determined/common/context.py
imports: import collections
  import pathlib
  from typing import Any, Dict, Iterable, List, Optional
  from determined.common import constants, detignore, util, v1file_utils
  from determined.common.api import bindings
label_desc: Use image node_id 4 for calling the _Builder obj's underlying member method code with example usage: obj.add(root_path, entry_prefix) without return types