'Given a Google Cloud Storage URL (gs://<bucket>/<blob>), returns a
tuple containing the corresponding bucket and blob.'

def parse_gcs_url(self, gsurl):

    try:
        from urllib.parse import urlparse
    except ImportError:
        from urlparse import urlparse
    parsed_url = urlparse(gsurl)
    if (not parsed_url.netloc):
        raise AirflowException(u'Please    provide    a    bucket    name')
    else:
        bucket = parsed_url.netloc
        blob = parsed_url.path.strip(u'/')
        return (bucket, blob)
