def get_default_id(credentials=None):
    """ Get default project id.

    Returns: the default project id if there is one, or None.
    """
    project_id = _utils.get_project_id()
    if project_id is None:
      projects, _ = Projects(credentials)._retrieve_projects(None, 2)
      if len(projects) == 1:
        project_id = projects[0].id
    return project_id
Get default project id.

    Returns: the default project id if there is one, or None.