def _ToLocalPath(toplevel_dir, path):
  """Converts |path| to a path relative to |toplevel_dir|."""
  if path == toplevel_dir:
    return ''
  if path.startswith(toplevel_dir + '/'):
    return path[len(toplevel_dir) + len('/'):]
  return path
dataset/ETHPy150Open adblockplus/gyp/pylib/gyp/generator/analyzer.py/_ToLocalPath/original