code: def get_by(self, prop, val, raise_exc=False):
          '''Retrieve an item from the dictionary with the given metadata
          properties. If there is no such item, None will be returned, if there
          are multiple such items, the first will be returned.'''
          try:
              val = self.serialize(val)
              return self._meta[prop][val][0]
          except (KeyError, IndexError):
              if raise_exc:
                  raise
              else:
                  return Nonf get_by(self, prop, val, raise_exc=False):
          '''Retrieve an item from the dictionary with the given metadata
          properties. If there is no such item, None will be returned, if there
          are multiple such items, the first will be returned.'''
          try:
              val = self.serialize(val)
              return self._meta[prop][val][0]
          except (KeyError, IndexError):
              if raise_exc:
                  raise
              else:
                  return None
docs: Retrieve an item from the dictionary with the given metadata
          properties. If there is no such item, None will be returned, if there
          are multiple such items, the first will be returned.