docs: def _trychar(char, fallback, asciimode=None):  # nocover
      """
      Logic from IPython timeit to handle terminals that cant show mu
  
      Args:
          char (str): character, typically unicode, to try to use
          fallback (str): ascii character to use if stdout cannot encode char
          asciimode (bool): if True, always use fallback
  
      Example:
          >>> char = _trychar('µs', 'us')
          >>> print('char = {}'.format(char))
          >>> assert _trychar('µs', 'us', asciimode=True) == 'us'
  
      """
      if asciimode is True:
          # If we request ascii mode simply return it
          return fallback
      if hasattr(sys.stdout, 'encoding') and sys.stdout.encoding:  # pragma: nobranch
          try:
              char.encode(sys.stdout.encoding)
          except Exception:  # nocover
              pass
          else:
              return char
      return fallback