code: def wrap_func(cls, func_lst, wrapper, **kwargs):
      """Wrapping a class method only once, inherited but not overridden method will not be wrapped again
  
      :param cls: class
      :param func_lst: function list to wrap
      :param wrapper: the wrapper
      :param kwargs: extra wrapper kwargs
      """
      for f_name in func_lst:
          if hasattr(cls, f_name) and all(
              getattr(cls, f_name) != getattr(i, f_name, None)
              for i in cls.mro()[1:]
          ):
              setattr(
                  cls, f_name, wrapper(getattr(cls, f_name), **kwargs)
              )
  
file_path: jina/jina/serve/helper.py
imports: import functools
  import inspect
  import os
  import typing
  from typing import Any, Dict, List, Optional, Tuple, Union
  import grpc
  from jina.helper import convert_tuple_to_list
  from contextlib import nullcontext
label_desc: Use image node_id 2 for calling a global function with example usage: wrap_func(cls, func_lst, wrapper) without return types