'(internal) Unjelly a method.'

def _unjelly_method(self, rest):

    im_name = rest[0]
    im_self = self.unjelly(rest[1])
    im_class = self.unjelly(rest[2])
    if (not isinstance(im_class, (type, _OldStyleClass))):
        raise InsecureJelly('Method    found    with    non-class    class.')
    if (im_name in im_class.__dict__):
        if (im_self is None):
            im = getattr(im_class, im_name)
        elif isinstance(im_self, NotKnown):
            im = _InstanceMethod(im_name, im_self, im_class)
        else:
            im = types.MethodType(im_class.__dict__[im_name], im_self, *([im_class] * (not _PY3)))
    else:
        raise TypeError('instance    method    changed')
    return im
