'For internal use.  Compile a specialized version of the function
for the given *args* and *kws*, and return the resulting callable.'

def _compile_for_args(self, *args, **kws):

    assert (not kws)
    argtypes = []
    for a in args:
        if isinstance(a, OmittedArg):
            argtypes.append(types.Omitted(a.value))
        else:
            argtypes.append(self.typeof_pyval(a))
    try:
        return self.compile(tuple(argtypes))
    except errors.TypingError as e:
        failed_args = []
        for (i, arg) in enumerate(args):
            val = (arg.value if isinstance(arg, OmittedArg) else arg)
            try:
                tp = typeof(val, Purpose.argument)
            except ValueError as typeof_exc:
                failed_args.append((i, str(typeof_exc)))
            else:
                if (tp is None):
                    failed_args.append((i, ('cannot    determine    Numba    type    of    value    %r' % (val,))))
        if failed_args:
            msg = (str(e).rstrip() + ('\n\nThis    error    may    have    been    caused    by    the    following    argument(s):\n%s\n' % '\n'.join((('-    argument    %d:    %s' % (i, err)) for (i, err) in failed_args))))
            e.patch_message(msg)
        raise e
