code: def on_enter(__msg: Optional[Union[Callable, str]] = None) -> Callable:
      
      # pylint: disable=missing-docstring
      def decorator(__func):
          @wraps(__func)
          def wrapper(*args, **kwargs):
              if __msg:
                  print(__msg)
              else:
                  print('Entering {!r}({!r})'.format(__func.__name__, __func))
              return __func(*args, **kwargs)
          return wrapper
      if callable(__msg):
          return on_enter()(__msg)
      return decorator
docs: Decorator to display a message when entering a function.
  
      Args:
          __msg: Message to display
      Returns:
          Wrapped function