code: def str2bool(v):
      if isinstance(v, bool):
          return v
      if v.lower() in ("yes", "true", "t", "y", "1"):
          return True
      elif v.lower() in ("no", "false", "f", "n", "0"):
          return False
      else:
          raise argparse.ArgumentTypeError("Boolean value expected.")
  
file_path: apex/apex/contrib/sparsity/permutation_tests/permutation_test.py
imports: import numpy
  import time
  import sys
  from permutation_search_kernels.permutation_utilities import *
  from permutation_search_kernels.exhaustive_search import Exhaustive_Search
  from permutation_search_kernels.channel_swap import Channel_Swap
  import argparse
label_desc: Use image node_id 1 for calling a global function with example usage: str2bool(v) and returns: v, True, False