def METHOD_NAME(secrets: Dict[str, Any]) -> App:
    """
    Initializes a Firebase "app" instance based on the given
    secrets `dict`. The value of the `project_id` key of the
    secrets dict is used for the `name` of the Firebase app.
    """
    creds = get_firebase_credentials(secrets)
    project_id = creds.project_id
    try:
        app = firebase_admin.get_app(project_id)
    except ValueError:
        app = firebase_admin.initialize_app(credential=creds, name=project_id)
    return app