code: def make_workspace(measurement, channel=None, name=None, silence=False):
      
      context = silence_sout_serr if silence else do_nothing
      with context():
          hist2workspace = ROOT.RooStats.HistFactory.HistoToWorkspaceFactoryFast(
              measurement)
          if channel is not None:
              workspace = hist2workspace.MakeSingleChannelModel(
                  measurement, channel)
          else:
              workspace = hist2workspace.MakeCombinedModel(measurement)
      workspace = asrootpy(workspace)
      keepalive(workspace, measurement)
      if name is not None:
          workspace.SetName('workspace_{0}'.format(name))
      return workspace
docs: Create a workspace containing the model for a measurement
  
      If `channel` is None then include all channels in the model
  
      If `silence` is True, then silence HistFactory's output on
      stdout and stderr.