def trading_mode_parent_inspection(element, parent):
    """
    Check if the trading class has the specified parent
    :param element: the element to check
    :param parent: the expected parent
    :return: the check result
    """
    return hasattr(element, 'get_parent_trading_mode_classes'
        ) and element.get_parent_trading_mode_classes(parent)
