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