code: def import_qutip():
      
      global _QUTIP_ERROR_LOGGED
      try:
          import qutip
      except ImportError:  # pragma no coverage
          qutip = None
          if not _QUTIP_ERROR_LOGGED:
              _log.error("Could not import qutip. Tomography tools will not function.")
              _QUTIP_ERROR_LOGGED = True
      return qutip
docs: Try importing the qutip module, log an error if unsuccessful.
  
      :return: The qutip module if successful or None
      :rtype: Optional[module]