code: def validate(self):
          
  
          extents_valid = (0 <= self.lower_extent <= self.upper_extent
              <= self.global_size)
  
          if not extents_valid:
              raise ValueError("Dimension '{d}' fails 0 <= {el} <= {eu} <= {gs}"
                  .format(d=self.name, gs=self.global_size,
                      el=self.lower_extent, eu=self.upper_extent))
docs: Validate the contents of a dimension data dictionary