def METHOD_NAME(table: catalog.Table, table_metadata: catalog.Table) -> catalog.Table:
    """Create metadata table.
    Parameters
    ----------
    table : catalog.Table
        Raw metadata table.
    Returns
    -------
    catalog.Table
        Metadata table.
    """
    columns_relevant = [
        "indicator_name",
        "topic",
        "series_code",
        "long_definition",
        "unit_of_measure",
        "source",
        "related_source_links",
        "license_type",
    ]
    # Get dataset generic license
    license_ = table.metadata.dataset.licenses[0]
    # Keep relevant columns
    table_metadata = table_metadata[columns_relevant]
    # Check that all variables have either no license or generic dataset license
    licenses = table_metadata.license_type.dropna().unique()
    assert len(licenses) == 1
    assert licenses[0] == "CC BY-4.0", f"License in dataset should be 'CC BY-4.0', but is {licenses[0].name} instead."
    assert license_.name == "CC BY 4.0", f"License in dataset should be 'CC BY 4.0', but is {license_.name} instead."
    # Assign generic dataset license to all variables
    # Replace NaNs in unit_of_measure for empty strings
    units = _build_unit(table_metadata)
    short_units = _build_short_unit(units)
    table_metadata = table_metadata.assign(
        license_name=license_.name,
        license_url=license_.url,
        unit=units,
        short_unit=short_units,
    ).drop(columns=["license_type", "unit_of_measure"])
    return table_metadata