parameters: (reduction_package, can)
return_statement: return ws_in_ads
docstring: For transmission workspaces, we use the names for them attached to the
      reduction package, rather than the name attached to the workspace variable.
      This is to avoid a bug where python variables containing workspaces which are also
      on the ADS appear to be deleted.
      This affects transmission workspaces for event slice data.
      :param reduction_package: an object containing workspace information
      :param can: a bool. If true then we are retrieving the transmission can.
                  Else retrieve the transmission
      :return: Workspace name
docstring_summary: For transmission workspaces, we use the names for them attached to the
      reduction package, rather than the name attached to the workspace variable.
      This is to avoid a bug where python variables containing workspaces which are also
      on the ADS appear to be deleted.
      This affects transmission workspaces for event slice data.
      :param reduction_package: an object containing workspace information
      :param can: a bool. If true then we are retrieving the transmission can.
                  Else retrieve the transmission
      :return: Workspace name
docstring_tokens: For transmission workspaces we use the names for them attached to the reduction package rather than the name attached to the workspace variable . This is to avoid a bug where python variables containing workspaces which are also on the ADS appear to be deleted . This affects transmission workspaces for event slice data . : param reduction_package : an object containing workspace information : param can : a bool . If true then we are retrieving the transmission can . Else retrieve the transmission : return : Workspace name
function: def get_transmission_names_to_save(reduction_package, can):
      """
      For transmission workspaces, we use the names for them attached to the
      reduction package, rather than the name attached to the workspace variable.
      This is to avoid a bug where python variables containing workspaces which are also
      on the ADS appear to be deleted.
      This affects transmission workspaces for event slice data.
      :param reduction_package: an object containing workspace information
      :param can: a bool. If true then we are retrieving the transmission can.
                  Else retrieve the transmission
      :return: Workspace name
      """
      if can:
          base_name = reduction_package.unfitted_transmission_can_base_name
          ws_names = reduction_package.unfitted_transmission_can_name
      else:
          base_name = reduction_package.unfitted_transmission_base_name
          ws_names = reduction_package.unfitted_transmission_name
      if base_name in (None, '') or ws_names in (None, '', []):
          return []
  
      ws_in_ads = []
  
      if AnalysisDataService.doesExist(base_name):
          group = AnalysisDataService.retrieve(base_name)
          for ws_name in ws_names:
              if group.contains(ws_name):
                  ws_in_ads.append(ws_name)
  
      return ws_in_ads
function_tokens: def get_transmission_names_to_save ( reduction_package , can ) : if can : base_name = reduction_package . unfitted_transmission_can_base_name ws_names = reduction_package . unfitted_transmission_can_name else : base_name = reduction_package . unfitted_transmission_base_name ws_names = reduction_package . unfitted_transmission_name if base_name in ( None , '' ) or ws_names in ( None , '' , [ ] ) : return [ ] ws_in_ads = [ ] if AnalysisDataService . doesExist ( base_name ) : group = AnalysisDataService . retrieve ( base_name ) for ws_name in ws_names : if group . contains ( ws_name ) : ws_in_ads . append ( ws_name ) return ws_in_ads