return the first func defined named name

def func(self, name: str):
        """return the first func defined named name"""
        for f in self.body:
            if (hasattr(f, '_ctype')
                    and isinstance(f._ctype, FuncType)
                    and f._name == name):
                return f