tools/metrics/histograms/expand_owners.py
def _GetOwnersFilePath(path):
  """Returns an absolute path that can be opened.

  Args:
    path: A well-formatted path to an OWNERS file, e.g. 'src/courgette/OWNERS'.

  Raises:
    Error: Raised if the given path is not well-formatted.
  """
  if _IsWellFormattedFilePath(path):
    # _SRC is removed because the file system on the machine running the code
    # may not have a(n) src directory.
    path_without_src = path[len(SRC):]

    return os.path.abspath(
        os.path.join(*(DIR_ABOVE_TOOLS + path_without_src.split(os.sep))))

  raise Error(
      'The given path {} is not well-formatted. Well-formatted paths begin '
      'with "src/" and end with "OWNERS"'.format(path))
Returns an absolute path that can be opened.

  Args:
    path: A well-formatted path to an OWNERS file, e.g. 'src/courgette/OWNERS'.

  Raises:
    Error: Raised if the given path is not well-formatted.
  
Returns an absolute path that can be opened.
Returns an absolute path that can be opened .
def _GetOwnersFilePath(path):
  if _IsWellFormattedFilePath(path):
    path_without_src = path[len(SRC):]
    return os.path.abspath(
        os.path.join(*(DIR_ABOVE_TOOLS + path_without_src.split(os.sep))))
  raise Error(
      'The given path {} is not well-formatted. Well-formatted paths begin '
      'with "src/" and end with "OWNERS"'.format(path))
def _GetOwnersFilePath ( path ) : if _IsWellFormattedFilePath ( path ) : path_without_src = path [ len ( SRC ) : ] return os . path . abspath ( os . path . join ( * ( DIR_ABOVE_TOOLS + path_without_src . split ( os . sep ) ) ) ) raise Error ( 'The given path {} is not well-formatted. Well-formatted paths begin ' 'with "src/" and end with "OWNERS"' . format ( path ) )
Returns an absolute path that can be opened.
Returns an absolute path that can be opened .
"""Returns an absolute path that can be opened.

  Args:
    path: A well-formatted path to an OWNERS file, e.g. 'src/courgette/OWNERS'.

  Raises:
    Error: Raised if the given path is not well-formatted.
  """ # _SRC is removed because the file system on the machine running the code # may not have a(n) src directory.
Raised if the given path is not well-formatted.
Raised if the given path is not well - formatted .
Error
path
A well-formatted path to an OWNERS file, e.g. 'src/courgette/OWNERS'.
A well - formatted path to an OWNERS file e . g . ' src / courgette / OWNERS ' .