def METHOD_NAME(  # pylint: disable=too-many-arguments
    project_id: str,
    client: bigquery.Client = None,
    mode: str = "prod",
    exclude_staging: bool = True,
    exclude_test: bool = True,
    exclude_logs: bool = True,
):
    """
    List all datasets and tables in a project.
    Args:
        client: BigQuery client.
        project_id: Project ID.
        mode: BigQuery client mode.
        exclude_staging: Exclude staging datasets.
        exclude_test: Exclude anything that contains the word "test".
        exclude_logs: Exclude log datasets.
    Returns:
        List of dictionaries in the format:
        {
            "project_id": "project_id",
            "dataset_id": "dataset_id",
            "table_id": "table_id",
            "url": "https://console.cloud.google.com/bigquery?p={project_id}&d={dataset_id}&t={table_id}&page=table",
            "private": True/False,
        }
    """
    if client is None:
        log(f"Creating BigQuery client in mode {mode}.")
        client = get_bigquery_client(mode=mode)
    log(f"Listing tables in project {project_id}.")
    tables = []
    for dataset in client.list_datasets(project=project_id):
        dataset_id: str = dataset.dataset_id
        if exclude_staging and dataset_id.endswith("_staging"):
            log(f"Excluding staging dataset {dataset_id}.")
            continue
        if exclude_test and "test" in dataset_id:
            log(f"Excluding test dataset {dataset_id}.")
            continue
        if exclude_logs and (
            dataset_id.startswith("logs_") or dataset_id.endswith("_logs")
        ):
            log(f"Excluding logs dataset {dataset_id}.")
            continue
        for table in client.METHOD_NAME(dataset):
            table_id = table.table_id
            if exclude_test and "test" in table_id:
                log(f"Excluding test table {table_id}.")
                continue
            table_info = {
                "project_id": project_id,
                "dataset_id": dataset_id,
                "table_id": table_id,
                "url": f"https://console.cloud.google.com/bigquery?p={project_id}&d={dataset_id}&t={table_id}&page=table",
                "private": not project_id == "datario",
            }
            tables.append(table_info)
    log(f"Found {len(tables)} tables in project {project_id}.")
    return tables