code: def _sample_to_str(sample):
      """Converts a bit-array to a string. For example, ``[0, 1]`` would become '01'."""
      return "".join(map(str, sample))
  
file_path: pennylane/pennylane/measurements/counts.py
imports: import warnings
  from typing import Sequence, Tuple, Optional
  import pennylane
  from pennylane.operation import Operator
  from pennylane.wires import Wires
  from .measurements import AllCounts, Counts, SampleMeasurement
  from .mid_measure import MeasurementValue
label_desc: Use image node_id 1 for calling a global function with example usage: _sample_to_str(sample) and returns: str