def METHOD_NAME(self, profile, key, xpath_template):
    xpath = xpath_template.format(key)
    node = profile.find(xpath)
    self.assertIsNotNone(node, 'Node not found: {}.'.format(xpath))
    return node