def generate_manifest_table_name(
    database_name, base_table_name, import_source, export_source
):
    """Returns the qualified manifest table name.

    Arguments:
        database_name (string): The name of the database
        base_table_name (string): The base name of the table
        import_source (string): "streaming_main", "streaming_equality", "historic" for import manifest (can be None)
        export_source (string): "full" or "incremental" for export manifests (can be None)

    """
    table_suffix = ""
    if import_source is not None:
        table_suffix += f"_{import_source.lower()}"
    if export_source is not None:
        table_suffix += f"_{export_source.lower()}"

    return f"{database_name}.{base_table_name}{table_suffix}"