from typing import Union
from typing import Set


def evaluate_wikipathways_metadata(metadata: Union[str, Set[str]]) -> str:
    """Evaluate metadata in wikipathways and return the string representation."""
    if isinstance(metadata, set):
        return ','.join(metadata)

    return metadata