def _make_serializer(meas, schema, rm_none, extra_tags, placeholder):  
_validate_schema(schema, placeholder)<EOL>tags = []<EOL>fields = []<EOL>ts = None<EOL>meas = meas<EOL>for k, t in schema.items():<EOL><INDENT>if t is MEASUREMENT:<EOL><INDENT>meas = f"<STR_LIT>"<EOL><DEDENT>elif t is TIMEINT:<EOL><INDENT>ts = f"<STR_LIT>"<EOL><DEDENT>elif t is TIMESTR:<EOL><INDENT>if pd:<EOL><INDENT>ts = f"<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>ts = f"<STR_LIT>"<EOL><DEDENT><DEDENT>elif t is TIMEDT:<EOL><INDENT>if pd:<EOL><INDENT>ts = f"<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>ts = f"<STR_LIT>"<EOL><DEDENT><DEDENT>elif t is TAG:<EOL><INDENT>tags.append(f"<STR_LIT>")<EOL><DEDENT>elif t is TAGENUM:<EOL><INDENT>tags.append(f"<STR_LIT>")<EOL><DEDENT>elif t in (FLOAT, BOOL):<EOL><INDENT>fields.append(f"<STR_LIT>")<EOL><DEDENT>elif t is INT:<EOL><INDENT>fields.append(f"<STR_LIT>")<EOL><DEDENT>elif t is STR:<EOL><INDENT>fields.append(f"<STR_LIT>")<EOL><DEDENT>elif t is ENUM:<EOL><INDENT>fields.append(f"<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>raise SchemaError(f"<STR_LIT>")<EOL><DEDENT><DEDENT>extra_tags = extra_tags or {}<EOL>for k, v in extra_tags.items():<EOL><INDENT>tags.append(f"<STR_LIT>")<EOL><DEDENT>if placeholder:<EOL><INDENT>fields.insert(<NUM_LIT:0>, f"<STR_LIT>")<EOL><DEDENT>sep = '<STR_LIT:U+002C>' if tags else '<STR_LIT>'<EOL>ts = f'<STR_LIT>' if ts else '<STR_LIT>'<EOL>fmt = f"<STR_LIT>"<EOL>if rm_none:<EOL><INDENT>pat = r'<STR_LIT>'<EOL>f = eval('<STR_LIT>'.format(pat, fmt))<EOL><DEDENT>else:<EOL><INDENT>f = eval('<STR_LIT>'.format(fmt))<EOL><DEDENT>f.__doc__ = "<STR_LIT>"<EOL>f._args = dict(meas=meas, schema=schema, rm_none=rm_none,<EOL>extra_tags=extra_tags, placeholder=placeholder)<EOL>return f<EOL>
Factory of line protocol parsers