def serialize_header(value, style='simple', explode=False):  # noqa
    """
    Serialize a header according to https://swagger.io/docs/specification/serialization/.

    Parameters
    ----------
    value :
        Value to serialize
    style : str ('simple')
        Serialization style.
    explode : bool
        Explode the object serialization.

    Returns
    -------
    str
        Serialized header.
    """
    if type(value) is list:
        return ','.join([str(item) for item in value])
    elif type(value) is dict:
        sep = '=' if explode else ','
        return ','.join(['{}{}{}'.format(k, sep, v) for k, v in value.items()])
    else:
        return str(value)