code: def _py_logical_values(rbool):
      if rbool in ["TRUE", "T"]:
          return True
      if rbool in ["FALSE", "F"]:
          return False
      raise RLogicalValueError
  
imports: import ast
  import re
  from json import dumps, loads
  from .languages import _JUPYTER_LANGUAGES
label_desc: Use image node_id 1 for calling a global function with example usage: _py_logical_values(rbool) and returns: True, False