code: def set_dtype(self, opt, dtype):
          
  
          # Take no action of self.dtype exists and is not None
          if not hasattr(self, 'dtype') or self.dtype is None:
              # DataType option overrides explicitly specified data type
              if opt['DataType'] is None:
                  self.dtype = dtype
              else:
                  self.dtype = np.dtype(opt['DataType'])
docs: Set the `dtype` attribute. If opt['DataType'] has a value
          other than None, it overrides the `dtype` parameter of this
          method. No changes are made if the `dtype` attribute already
          exists and has a value other than 'None'.
  
          Parameters
          ----------
          opt : :class:`cdict.ConstrainedDict` object
            Algorithm options
          dtype : data-type
            Data type for working variables (overridden by 'DataType' option)