code: def get_element_with_id(self, id):
          
          # Should we maintain a hashmap of ids to make this more efficient? Probably overkill.
          # TODO: Elements can contain nested elements (captions, footnotes, table cells, etc.)
          return next((el for el in self.elements if el.id == id), None)
docs: Return the element with the specified ID.