human
I wrote the below code

    input_types = arg_types[:ufunc.nin]
    output_types = arg_types[ufunc.nin:]
    assert (len(input_types) == ufunc.nin)
    try:
        np_input_types = [as_dtype(x) for x in input_types]
    except NotImplementedError:
        return None
    try:
        np_output_types = [as_dtype(x) for x in output_types]
    except NotImplementedError:
        return None
    has_mixed_inputs = (any(((dt.kind in 'iu') for dt in np_input_types)) and any(((dt.kind in 'cf') for dt in np_input_types)))
    def choose_types(numba_types, ufunc_letters):
        '\n                                Return    a    list    of    Numba    types    representing    *ufunc_letters*,\n                                except    when    the    letter    designates    a    datetime64    or    timedelta64,\n                                in    which    case    the    type    is    taken    from    *numba_types*.\n                                '
        assert (len(ufunc_letters) >= len(numba_types))
        types = [(tp if (letter in 'mM') else from_dtype(np.dtype(letter))) for (tp, letter) in zip(numba_types, ufunc_letters)]
        types += [from_dtype(np.dtype(letter)) for letter in ufunc_letters[len(numba_types):]]
        return types
    for candidate in ufunc.types:
        ufunc_inputs = candidate[:ufunc.nin]
        ufunc_outputs = candidate[(- ufunc.nout):]
        if ('O' in ufunc_inputs):
            continue
        found = True
        for (outer, inner) in zip(np_input_types, ufunc_inputs):
            if ((outer.char in 'mM') or (inner in 'mM')):
                if (outer.char != inner):
                    found = False
                    break
            elif (not ufunc_can_cast(outer.char, inner, has_mixed_inputs, 'safe')):
                found = False
                break
        if (found and strict_ufunc_typing):
            for (outer, inner) in zip(np_output_types, ufunc_outputs):
                if ((outer.char not in 'mM') and (not ufunc_can_cast(inner, outer.char, has_mixed_inputs, 'same_kind'))):
     ...

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def ufunc_find_matching_loop(ufunc, arg_types):