<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _characterize_header(self, header, hgroups):
 """Characterize header groups into different data types. """

        out = []
        for h in [header[g[0]] for g in hgroups]:
            this_ctype = None
            for ctype, names in self._col_types.items():
                if h.startswith(names):
                    this_ctype = ctype
                    break
            out.append(this_ctype)
        return out