code: def str_to_bool(bool_str: Optional[str]) -> bool:
      result = False
      bool_str = str(bool_str).lower()
      if bool_str == "true" or bool_str == "1":
          result = True
      return result
  
file_path: PySyft/packages/syft/src/syft/util/telemetry.py
imports: import os
  from typing import Callable
  from typing import Optional
  from typing import TypeVar
  from typing import Union
  from typing_extensions import Concatenate
  from typing_extensions import ParamSpec
label_desc: Use image node_id 1 for calling a global function with example usage: str_to_bool(bool_str) and returns: result