def _check_aligned_header(self, data_type, unit):
if data_type is not None:<EOL><INDENT>assert isinstance(data_type, DataTypeBase),'<STR_LIT>'.format(type(data_type))<EOL>if unit is None:<EOL><INDENT>unit = data_type.units[<NUM_LIT:0>]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>data_type = self.header.data_type<EOL>unit = unit or self.header.unit<EOL><DEDENT>return Header(data_type, unit, self.header.analysis_period, self.header.metadata)<EOL>
Check the header inputs whenever get_aligned_collection is called.