def _parse(template):
 parser = Parser(template)
 parser.parse_expression()
 parts = parser.parts
 remainder = parser.string[parser.pos:]
 if remainder:
  parts.append(remainder)
 return Expression(parts)

def _parse ( template ) : parser = Parser ( template ) parser . parse_expression ( ) parts = parser . parts remainder = parser . string [ parser . pos : ] if remainder : parts . append ( remainder ) return Expression ( parts )
parse metadata yaml .