def get_db_func(dictdb, cmd):
    """
    Return callable function of method on ``dictdb``.

    :raises AssertionError: not a valid method or not callable.
    """
    assert hasattr(dictdb, cmd
        ), '{cmd!r} not a valid method of {db_type!r}'.format(cmd=cmd,
        db_type=type(dictdb))
    func = getattr(dictdb, cmd)
    assert callable(func
        ), '{cmd!r} not a callable method of {db_type!r}'.format(cmd=cmd,
        db_type=type(dictdb))
    return func
