def METHOD_NAME(storage_client, table_metadata, bucket):
    """Write metadata for each public table to GCS."""
    for metadata in table_metadata:
        output_file = f"gs://{bucket}/{metadata.files_path}"
        logging.info(f"Write metadata to {output_file}")
        with smart_open.open(output_file, "w") as fout:
            fout.write(json.dumps(metadata.files_metadata_to_json(), indent=4))
        set_content_type(
            storage_client, bucket, f"{metadata.files_path}", "application/json"
        )