def pulse_sink_port(sink, name_or_desc):
    """
    Returns the PulseSinkInfo that matches the string, either against the name or the description.

    :param sink: the PulseSinkObject to get the port from
    :type sink: pulsectl.PulseSinkObject
    :param name_or_desc: the name or description string to look for, uses active one if None
    :type name_or_desc: str
    :return: the PulseSinkInfo object or None if not found
    :rtype: pulsectl.pulsectl.PulseSinkInfo
    """

    if sink is None:
        raise Exception("No sink object provided!")

    result = None

    if name_or_desc is None:
        if sink.port_active is not None:
            result = sink.port_active
    else:
        for port in sink.port_list:
            if (port.name == name_or_desc) or (port.description == name_or_desc):
                result = port
                break

    return result