docs: def astype(value, types=None):
      """Return argument as one of types if possible.
  
      >>> astype('42')
      42
      >>> astype('3.14')
      3.14
      >>> astype('True')
      True
      >>> astype(b'Neee-Wom')
      'Neee-Wom'
  
      """
      if types is None:
          types = int, float, asbool, bytes2str
      for typ in types:
          try:
              return typ(value)
          except (ValueError, AttributeError, TypeError, UnicodeEncodeError):
              pass
      return value