code: def _check_state(self):
          
          if(self.grid is not None and
             self.configs.configs is not None and
             self.assignments['forward_model'] is not None):
              self.can_model = True
  
          if(self.grid is not None and
             self.assignments['measurements'] is not None):
              self.can_invert = True
docs: Check if this instance can model and/or can invert