def bind_instancemethod(m, dispatcher, *accept_args, **accept_kwargs):
    """
    Bind a function to a dispatcher.

    Takes accept_args, and accept_kwargs and creates and ArgSpec instance,
    adding that to the MNDFunction which annotates the function


    :param f:  function to wrap
    :param accept_args:
    :param accept_kwargs:
    :return:
    """
    argspec = ArgSpec(None, *accept_args, **accept_kwargs)
    mnd = MNDMethod(m, dispatcher, argspec)
    m.__dict__['__mnd__'] = mnd
    return m