def __has_method(o, m):
    """
    Test if a given object has a given method
    :param o: object
    :param m: method name
    :return: True or False
    """
    mm = getattr(o, m, None)
    return callable(mm)