code: def str2bool(value):
      """
      Tries to transform a string supposed to represent a boolean to a boolean.
  
      Parameters
      ----------
      value : str
          The string that is transformed to a boolean.
  
      Returns
      -------
      boolval : bool
          The boolean representation of `value`.
  
      Raises
      ------
      ValueError
          If the string is not 'True' or 'False' (case independent)
  
      Examples
      --------
      >>> np.lib._iotools.str2bool('TRUE')
      True
      >>> np.lib._iotools.str2bool('false')
      False
  
      """
      value = value.upper()
      if value == "TRUE":
          return True
      elif value == "FALSE":
          return False
      else:
          raise ValueError("Invalid boolean")
  
imports: from __future__ import division, absolute_import, print_function
  import sys
  import numpy
  import numpy.core.numeric
  from numpy.compat import asbytes, asunicode, bytes, basestring
label_desc: Use image node_id 7 for calling a global function with example usage: str2bool(value) and returns: True, False