code: def _process_path_prefix(path_prefix):
    
    _validate_path(path_prefix)
    if not _GCS_PATH_PREFIX_REGEX.match(path_prefix):
      raise ValueError('Path prefix should have format /bucket, /bucket/, '
                       'or /bucket/prefix but got %s.' % path_prefix)
    bucket_name_end = path_prefix.find('/', 1)
    bucket = path_prefix
    prefix = None
    if bucket_name_end != -1:
      bucket = path_prefix[:bucket_name_end]
      prefix = path_prefix[bucket_name_end + 1:] or None
    return bucket, prefix
docs: Validate and process a Google Cloud Stoarge path prefix.
  
    Args:
      path_prefix: a Google Cloud Storage path prefix of format '/bucket/prefix'
        or '/bucket/' or '/bucket'.
  
    Raises:
      ValueError: if path is invalid.
  
    Returns:
      a tuple of /bucket and prefix. prefix can be None.