code: def _add_cwire_measurement(m, layer_str, config):
      """Updates ``layer_str`` with the ``m`` measurement when it is used
      for collecting mid-circuit measurement statistics."""
      mcms = (
          [v.measurements[0] for v in m.mv]
          if isinstance(m.mv, list)
          else m.mv.measurements
      )
      layer_str = _add_cwire_measurement_grouping_symbols(
          mcms, layer_str, config
      )
  
      mv_label = "MCM"
      meas_label = measurement_label_map[m.return_type](mv_label)
  
      n_wires = len(config.wire_map)
      for mcm in mcms:
          ind = config.bit_map[mcm] + n_wires
          layer_str[ind] += meas_label
  
      return layer_str
  
file_path: pennylane/pennylane/drawer/tape_text.py
imports: from dataclasses import dataclass
  from typing import Optional
  import pennylane
  from pennylane.measurements import Expectation, Probability, Sample, Variance, State, Counts, MidMeasureMP
  from .drawable_layers import drawable_layers
  from .utils import convert_wire_order, unwrap_controls, cwire_connections, default_bit_map
label_desc: Use image node_id 7 for calling a global function with example usage: _add_cwire_measurement(m, layer_str, config) and returns: layer_str