code: def _validate_prepostloop_callable(cls, func: Callable[[None], None]) -> None:
          
          cls._validate_callable_param_count(func, 0)
          # make sure there is no return notation
          signature = inspect.signature(func)
          if signature.return_annotation is not None:
              raise TypeError("{} must declare return a return type of 'None'".format(
                  func.__name__,
              ))
docs: Check parameter and return types for preloop and postloop hooks.