code: def _validate_lattice_spacing(self, lattice_spacing):
          
  
          dataType = np.float64
  
          if lattice_spacing is not None:
              lattice_spacing = np.asarray(lattice_spacing, dtype=dataType)
              lattice_spacing = lattice_spacing.reshape((3,))
              if np.shape(lattice_spacing) != (self.dimension,):
                  raise ValueError('Lattice spacing should be a vector of '
                                   'size:({},). Please include lattice spacing '
                                   'of size >= 0 depending on desired '
                                   'dimensionality.'
                                   .format(self.dimension))
          else:
              raise ValueError('No lattice_spacing provided. Please provide '
                               'lattice spacing\'s that are >= 0. with size ({},)'
                               .format((self.dimension)))
  
          if np.any(np.isnan(lattice_spacing)):
              raise ValueError('None type or NaN type values present in '
                               'lattice_spacing: {}.'.format(lattice_spacing))
          elif np.any(lattice_spacing < 0.0):
              raise ValueError('Negative lattice spacing value. One of '
                               'the spacing: {} is negative.'
                               .format(lattice_spacing))
  
          self.lattice_spacing = lattice_spacing
docs: Ensure that lattice spacing is provided and correct.
  
          _validate_lattice_spacing will ensure that the lattice spacing
          provided are acceptable values. Additional Numpy errors can also occur
          due to the conversion to a Numpy array.
  
          Exceptions Raised
          -----------------
          ValueError : Incorrect lattice_spacing input