code: def _get_registerd_func(name_or_func):
      
      # get the function or register callable
      if callable(name_or_func):
          func = register_array_xcorr(name_or_func)
      else:
          func = XCOR_FUNCS[name_or_func or 'default']
      assert callable(func), 'func is not callable'
      # ensure func has the added methods
      if not hasattr(func, 'registered'):
          func = register_array_xcorr(func)
      return func
docs: get a xcorr function from a str or callable.