def get_project_id():
    project_id = get_gce_project_id()

    if project_id:
        return project_id

    return call(
        'gcloud',
        'config',
        'list',
        'project',
        '--format=value(core.project)',
        silent=True).strip().split('\n').pop()
Gets the google cloud project either via the GCE metadata service or
dataset/ETHPy150Open jonparrott/noel/noel/noel/builder/gcp.py/get_project_id