parameters: (workspace)
docstring: Creates a generator of workspaces indices corresponding to spectra which are actually monitors
  
      :param workspace: workspace to check for monitors.
      :return: a generator for workspace indices.
docstring_summary: Creates a generator of workspaces indices corresponding to spectra which are actually monitors
docstring_tokens: Creates a generator of workspaces indices corresponding to spectra which are actually monitors
function: def get_workspace_indices_for_monitors(workspace):
      """
      Creates a generator of workspaces indices corresponding to spectra which are actually monitors
  
      :param workspace: workspace to check for monitors.
      :return: a generator for workspace indices.
      """
      for index in range(workspace.getNumberHistograms()):
          detector = workspace.getDetector(index)
          if detector.isMonitor():
              yield index
function_tokens: def get_workspace_indices_for_monitors ( workspace ) : for index in range ( workspace . getNumberHistograms ( ) ) : detector = workspace . getDetector ( index ) if detector . isMonitor ( ) : yield index