def _validate_isvalid_history(self, isvalid_history, field, value):
<EOL>history_type = value['<STR_LIT:type>']<EOL>if history_type.endswith('<STR_LIT>'):<EOL><INDENT>history_type = '<STR_LIT>'<EOL><DEDENT>elif history_type.endswith('<STR_LIT>'):<EOL><INDENT>history_type = '<STR_LIT>'<EOL><DEDENT>quantity = <NUM_LIT:1.0>*(units(value['<STR_LIT>']['<STR_LIT>']))<EOL>try:<EOL><INDENT>quantity.to(property_units[history_type])<EOL><DEDENT>except pint.DimensionalityError:<EOL><INDENT>self._error(field, '<STR_LIT>'<EOL>'<STR_LIT>' + property_units[history_type])<EOL><DEDENT>time = <NUM_LIT:1.0>*(units(value['<STR_LIT:time>']['<STR_LIT>']))<EOL>try:<EOL><INDENT>time.to(property_units['<STR_LIT:time>'])<EOL><DEDENT>except pint.DimensionalityError:<EOL><INDENT>self._error(field, '<STR_LIT>'<EOL>'<STR_LIT>' + property_units['<STR_LIT:time>'])<EOL><DEDENT>n_cols = len(value['<STR_LIT>'][<NUM_LIT:0>])<EOL>max_cols = max(value['<STR_LIT:time>']['<STR_LIT>'],<EOL>value['<STR_LIT>']['<STR_LIT>'],<EOL>value.get('<STR_LIT>', {}).get('<STR_LIT>', <NUM_LIT:0>)) + <NUM_LIT:1><EOL>if n_cols > max_cols:<EOL><INDENT>self._error(field, '<STR_LIT>')<EOL><DEDENT>elif n_cols < max_cols:<EOL><INDENT>self._error(field, '<STR_LIT>')<EOL><DEDENT>
Checks that the given time history is properly formatted.

        Args:
            isvalid_history (`bool`): flag from schema indicating units to be checked.
            field (`str`): property associated with history in question.
            value (`dict`): dictionary of values from file associated with this property.

        The rule's arguments are validated against this schema:
            {'isvalid_history': {'type': 'bool'}, 'field': {'type': 'str'},
             'value': {'type': 'dict'}}