Find if the provided connection object has a specific method

def conn_has_method(conn, method_name):
    '''
    Find if the provided connection object has a specific method
    '''
    if method_name in dir(conn):
        return True

    log.error('Method \'%s\' not yet supported!', method_name)
    return False