def list_datasets(service, project_id):
    """Lists BigQuery datasets.

    Args:
        service: BigQuery service object that is authenticated.  Example: service = build('bigquery','v2', http=http)
        project_id: string, Name of Google project

    Returns:
        List containing dataset names
    """
    datasets = service.datasets()
    response = datasets.list(projectId=project_id).execute()

    dataset_list = []
    for field in response['datasets']:
        dataset_list.append(field['datasetReference']['datasetId'])

    return dataset_list