import logging


def get_bucket_path(gcs_uri):
	""" divides uri into bucket and path
	Args:
		gcs_uri (STRING): Google cloud storage uri to object
	Returns:
		bucket_name (STRING): name of bucket
		gcs_path (STRING):  object path
	"""
	logging.info("gcs_uri: {}".format(gcs_uri))
	if not gcs_uri.startswith('gs://'):
		raise Exception('{} does not start with gs://'.format(gcs_uri))
	no_gs_uri = gcs_uri[len('gs://'):]
	first_slash_index = no_gs_uri.find('/')
	bucket_name = no_gs_uri[:first_slash_index]
	gcs_path = no_gs_uri[first_slash_index + 1:]
	return bucket_name, gcs_path