def _serialize(xp_ast):
if hasattr(xp_ast, '<STR_LIT>'):<EOL><INDENT>for tok in xp_ast._serialize():<EOL><INDENT>yield tok<EOL><DEDENT><DEDENT>elif isinstance(xp_ast, string_types):<EOL><INDENT>yield repr(xp_ast).lstrip('<STR_LIT:u>')<EOL><DEDENT>else:<EOL><INDENT>yield str(xp_ast)<EOL><DEDENT>
Generate token strings which, when joined together, form a valid
    XPath serialization of the AST.