def normalized(self): orig_header = self.pipeline_start header = [] for i, c in enumerate(orig_header): if c: c = python_identifier(c) c = nml.NormHeader(c) if not c: c = f'TEMP_{i}' if c in header: c = c + f'_TEMP_{i}' header.append(c) return header
def to_string_and_then_python_identifier(thing): """ handl cases where a header value isn't a string """ return python_identifier(str(thing))