def calculate(self, **state):
if not self.state_validator.validate(state):<EOL><INDENT>msg = f"<STR_LIT>"<EOL>msg += f"<STR_LIT>"<EOL>for key, value in self.state_validator.errors.items():<EOL><INDENT>msg += '<STR_LIT>' % (key, value)<EOL><DEDENT>msg = msg[<NUM_LIT:0>:-<NUM_LIT:1>]+'<STR_LIT:.>'<EOL>raise ValidationError(msg)<EOL><DEDENT>
Base calculate method for models.
Validates the material state parameter(s).

:param **state: The material state