def findfirst(self, py_func):
        """
        Returns the first result from `.finditer(py_func)`; or None if no match.
        """
        try:
            return next(self.finditer(py_func))
        except StopIteration:
            return

        Returns the first result from `.finditer(py_func)`; or None if no match.
        
numba/core/typing/context.py