original_docstring: 
      Calculate the observed CLs and the expected CLs band from a background only
      and signal patch.
  
      Args:
          bkgonly_json: The JSON for the background only model
          signal_patch_json: The JSON Patch for the signal model
  
      Returns:
          CLs_obs: The observed CLs value
          CLs_exp: List of the expected CLs value band
      
docstring: Calculate the observed CLs and the expected CLs band from a background only
  and signal patch.
docstring_tokens: Calculate the observed CLs and the expected CLs band from a background only and signal patch .
code: def calculate_CLs(bkgonly_json, signal_patch_json):
      """
      Calculate the observed CLs and the expected CLs band from a background only
      and signal patch.
  
      Args:
          bkgonly_json: The JSON for the background only model
          signal_patch_json: The JSON Patch for the signal model
  
      Returns:
          CLs_obs: The observed CLs value
          CLs_exp: List of the expected CLs value band
      """
      workspace = pyhf.workspace.Workspace(bkgonly_json)
      model = workspace.model(
          measurement_name=None,
          patches=[signal_patch_json],
          modifier_settings={
              'normsys': {'interpcode': 'code4'},
              'histosys': {'interpcode': 'code4p'},
          },
      )
      result = pyhf.infer.hypotest(
          1.0, workspace.data(model), model, qtilde=True, return_expected_set=True
      )
      return result[0].tolist()[0], result[-1].ravel().tolist()
code_tokens: def calculate_CLs ( bkgonly_json , signal_patch_json ) : workspace = pyhf . workspace . Workspace ( bkgonly_json ) model = workspace . model ( measurement_name = None , patches = [ signal_patch_json ] , modifier_settings = { 'normsys' : { 'interpcode' : 'code4' } , 'histosys' : { 'interpcode' : 'code4p' } , } , ) result = pyhf . infer . hypotest ( 1.0 , workspace . data ( model ) , model , qtilde = True , return_expected_set = True ) return result [ 0 ] . tolist ( ) [ 0 ] , result [ - 1 ] . ravel ( ) . tolist ( )
short_docstring: Calculate the observed CLs and the expected CLs band from a background only
  and signal patch.
short_docstring_tokens: Calculate the observed CLs and the expected CLs band from a background only and signal patch .
comment: """
      Calculate the observed CLs and the expected CLs band from a background only
      and signal patch.
  
      Args:
          bkgonly_json: The JSON for the background only model
          signal_patch_json: The JSON Patch for the signal model
  
      Returns:
          CLs_obs: The observed CLs value
          CLs_exp: List of the expected CLs value band
      """