def METHOD_NAME(  # pylint: disable=inconsistent-return-statements
    status_code, message, description, amqp_transport
):
    condition = message.application_properties.get(
        MGMT_RESPONSE_MESSAGE_ERROR_CONDITION
    )
    if status_code == 200:
        parsed = []
        for m in amqp_transport.get_message_value(message)[b"sessions-ids"]:
            parsed.append(m.decode("UTF-8"))
        return parsed
    if status_code in [202, 204]:
        return []
    amqp_transport.handle_amqp_mgmt_error(
        _LOGGER, "List sessions failed.", condition, description, status_code
    )