def coerce_input_to_str(data):
    """ Coerce url data to a comma separated string.
        e.g. ['a','b'] becomes 'a,b' while 'c,d' is
        unchanged.

        :param data: Input data to coerce.
        :type data: str, list, tuple

        :return: Joined string.
        :rtype: str

    """
    if isinstance(data, str):
        return data
    elif isinstance(data, (list, tuple)):
        return ",".join(data)
    raise ValueError(f"{data} is not a valid input.")