def last(path):
  """Returns a last "part" of a path.

  Examples:
    last('abc/def/ghi') => 'ghi'
    last('abc') => 'abc'
    last('') => ''
  """
  if '/' not in path:
    return path
  return path.split('/')[-1]