code: def wrapper_from_data(dcm_data):
      """Create DICOM wrapper from DICOM data object
  
      Parameters
      ----------
      dcm_data : ``dicom.dataset.Dataset`` instance or similar
         Object allowing attribute access, with DICOM attributes.
         Probably a dataset as read by ``pydicom``.
  
      Returns
      -------
      dcm_w : ``dicomwrappers.Wrapper`` or subclass
         DICOM wrapper corresponding to DICOM data type
      """
      sop_class = dcm_data.get("SOPClassUID")
      # try to detect what type of dicom object to wrap
      if (
          sop_class == "1.2.840.10008.5.1.4.1.1.4.1"
      ):  # Enhanced MR Image Storage
          # currently only Philips is using Enhanced Multiframe DICOM
          return MultiframeWrapper(dcm_data)
      # Check for Siemens DICOM format types
      # Only Siemens will have data for the CSA header
      try:
          csa = csar.get_csa_header(dcm_data)
      except csar.CSAReadError as e:
          warnings.warn(
              f"Error while attempting to read CSA header: {e.args}\n"
              "Ignoring Siemens private (CSA) header info."
          )
          csa = None
      if csa is None:
          return Wrapper(dcm_data)
      if csar.is_mosaic(csa):
          # Mosaic is a "tiled" image
          return MosaicWrapper(dcm_data, csa)
      # Assume data is in a single slice format per file
      return SiemensWrapper(dcm_data, csa)
  
imports: import operator
  import warnings
  import numpy
  from nibabel.optpkg import optional_package
  from ..onetime import auto_attr
  from ..openers import ImageOpener
  from .None import csareader
  from .dwiparams import B2q, nearest_pos_semi_def, q2bg
label_desc: Use image node_id 2 for calling a global function with example usage: wrapper_from_data(dcm_data) and returns: SiemensWrapper, MultiframeWrapper, Wrapper, MosaicWrapper