code: def copy_meta_data(hdr_to, hdr_from):
      r"""
      Copy image meta data (voxel spacing and offset) from one header to another.
  
      Parameters
      ----------
      hdr_to : object
          An image header as returned by `load`.
      hdr_from : object
          An image header as returned by `load`.
      """
      warnings.warn(
          "copy_meta_data() is depreciated and may be removed in future versions",
          category=DeprecationWarning,
      )
      logger = Logger.getInstance()
      try:
          set_pixel_spacing(hdr_to, get_pixel_spacing(hdr_from))
      except AttributeError as e:
          logger.warning(
              "The voxel spacing could not be set correctly. Signaled error: {}".format(
                  e
              )
          )
      try:
          set_offset(hdr_to, get_offset(hdr_from))
      except AttributeError as e:
          logger.warning(
              "The image offset could not be set correctly. Signaled error: {}".format(
                  e
              )
          )
  
imports: import warnings
  import numpy
  from ..core import Logger
label_desc: Use image node_id 7 for calling a global function with example usage: copy_meta_data(hdr_to, hdr_from) without return types