def _get_element_by_id(self, resource_name, eclass, id):
elements = self._get_elements(resource_name, eclass, id=id)<EOL>if not elements:<EOL><INDENT>raise ValueError("<STR_LIT>".format(id))<EOL><DEDENT>if len(elements) == <NUM_LIT:1>:<EOL><INDENT>return elements[<NUM_LIT:0>]<EOL><DEDENT>raise ValueError("<STR_LIT>".format(id))<EOL>
Get a single element matching an id