code: def boolean(value):
      
      value = value.strip().lower()
      try:
          return _BOOL_DICT[value]
      except KeyError:
          raise ValueError('Not a boolean: %s' % value)
docs: :param value: input string such as '0', '1', 'true', 'false'
      :returns: boolean
  
      >>> boolean('')
      False
      >>> boolean('True')
      True
      >>> boolean('false')
      False
      >>> boolean('t')
      Traceback (most recent call last):
          ...
      ValueError: Not a boolean: t