docs: def lookup_ids(self, keys):
          """Lookup the integer ID associated with each (namespace, key) in the
          keys list"""
          keys_len = len(keys)
          ids = {namespace_key: None for namespace_key in keys}
          start = 0
          bulk_insert = self.bulk_insert
          query = 'SELECT namespace, key, id FROM gauged_keys WHERE '
          check = '(namespace = %s AND key = %s) '
          cursor = self.cursor
          execute = cursor.execute
          while start < keys_len:
              rows = keys[start:start+bulk_insert]
              params = [param for params in rows for param in params]
              id_query = query + (check + ' OR ') * (len(rows) - 1) + check
              execute(id_query, params)
              for namespace, key, id_ in cursor:
                  ids[(namespace, key)] = id_
              start += bulk_insert
          return ids