code: def _get_required_fn(fn, root_path):
      
      if not fn.startswith(root_path):
          raise ValueError("Both paths have to be absolute or local!")
  
      replacer = "/" if root_path.endswith("/") else ""
  
      return fn.replace(root_path, replacer, 1)
docs: Definition of the MD5 file requires, that all paths will be absolute
      for the package directory, not for the filesystem.
  
      This function converts filesystem-absolute paths to package-absolute paths.
  
      Args:
          fn (str): Local/absolute path to the file.
          root_path (str): Local/absolute path to the package directory.
  
      Returns:
          str: Package-absolute path to the file.
  
      Raises:
          ValueError: When `fn` is absolute and `root_path` relative or \
                      conversely.