docs: def get_by(lst, field, value):
      '''Find an object in a list given a field value'''
      for row in lst:
          if ((isinstance(row, dict) and row.get(field) == value) or
                  (getattr(row, field, None) == value)):
              return row