code: def _relative_paths(xs, base_path):
      
      if isinstance(xs, six.string_types):
          if xs.startswith(base_path):
              return xs.replace(base_path + "/", "", 1)
          else:
              return xs
      elif isinstance(xs, (list, tuple)):
          return [_relative_paths(x, base_path) for x in xs]
      elif isinstance(xs, dict):
          out = {}
          for k, v in xs.items():
              out[k] = _relative_paths(v, base_path)
          return out
      else:
          return xs
docs: Adjust paths to be relative to the provided base path.