def to_bool(str):
  if str in [True, "True", "true"]:
    return True
  elif str in [False, "False", "false"]:
    return False
  else:
    raise ValueError("Not a boolean: %r" % str)
dataset/ETHPy150Open jlevy/ghizmo/ghizmo/commands/lib.py/to_bool/original