code: def _bspn_to_dict(
      self, bspn, no_name=False, no_book=False, bspn_mode="bspn"
  ):
      constraint_dict = self.reader.bspan_to_constraint_dict(
          bspn, bspn_mode=bspn_mode
      )
      constraint_dict_flat = {}
      for domain, cons in constraint_dict.items():
          for s, v in cons.items():
              key = domain + "-" + s
              if no_name and s == "name":
                  continue
              if no_book:
                  if s in ["people", "stay"] or key in [
                      "hotel-day",
                      "restaurant-day",
                      "restaurant-time",
                  ]:
                      continue
              constraint_dict_flat[key] = v
      return constraint_dict_flat
  
imports: import math, logging, copy, json
  from collections import Counter, OrderedDict
  from nltk.util import ngrams
  from .None import ontology
  from .clean_dataset import clean_slot_values
label_desc: Use image node_id 10 for calling the MultiWozEvaluator obj's underlying member method code with example usage: obj._bspn_to_dict(bspn, no_name, no_book, bspn_mode) and returns: constraint_dict_flat