import re


def ParseGCSPath(remote_file_path):
  """Parse a Google Cloud Storage path to bucket and path.

  Args:
    remote_file_path: gs://bucket/path/to/file format path.
  Returns:
    (bucket name, remote path relative to bucket)
  """
  p = re.compile(r'gs://([^/]*)/(.*)')
  m = p.match(remote_file_path)
  if m:
    return m.group(1), m.group(2)
  return None, None