docs: def _update_table_names(name, dat):
      """
      Model placement is subject to change. That means all names within the model (names are path-dependent) are also
      subject to change. Whichever name is decided, the inner data needs to match it.
  
      :param dict dat: Metadata
      :param str name: Table name
      :return dict dat: Metadata
      """
      for _tabletype in ["summary", "distribution", "ensemble"]:
          _ttname = "{}Table".format(_tabletype)
          if _ttname in dat:
              _new_tables = OrderedDict()
              _idx = 0
              # change all the top level table names
              for k,v in dat[_ttname].items():
                  _new_ttname= "{}{}{}".format(name, _tabletype, _idx)
                  _idx +=1
                  #change all the table names in the table metadata
                  v["tableName"] = _new_ttname
                  # remove the filename. It shouldn't be stored anyway
                  if "filename" in v:
                      v["filename"] = ""
                  # place dat into the new ordered dictionary
                  _new_tables[_new_ttname] = v
  
              # place new tables into the original dat
              dat[_ttname] = _new_tables
  
      return dat