@staticmethod
def find_element(elements, field, value):
    """ Helper method to lookup an element in an array by field value. """
    for e in elements:
        if e[field] == value:
            return e
    assert False, 'element not found, {}={}'.format(field, value)
