code: def set_table_dims(self, container: str, rel_prefix: str):
      # The first column shows the stub headings, "Release" is not included in `fields`.
      # The release value, like 22.03, is always a single line.
      fields = self.table_config[container]
      stubs = list(fields.keys())
      stub_maxwidth = len(max(["Release"] + stubs, key=len))
  
      # Seems unlikely that the row stub "heading" has the most lines, but possible.
      for field in fields.keys():
          if field == "maxwidth":
              continue
          fields[field]["maxlines"] = field.count("\n")
      # components = { k: v for k, v in fields.items() if not "span" in v.keys() }
      # Filter decorative span rows.
  
      releases = [
          x for x in self.data[container] if x.startswith(rel_prefix)
      ]
      # releases = list(self.data[container])
      for release in releases:
          # Find the longest string that we'll put in a column for this release.
          maxwidth = 0
          for k, v in fields.items():
              if k == "maxwidth" or "span" in v.keys():
                  continue
              val = self.data[container][release][v["field"]]
              line_len = max(len(x) for x in val.split("\n"))
              line_count = val.count("\n")
              maxwidth = max(maxwidth, line_len)
              v["maxlines"] = max(v["maxlines"], line_count)
  
          self.data[container][release]["maxwidth"] = maxwidth
      fields["maxwidth"] = stub_maxwidth + len("**") + len("**")
  
file_path: Merlin/docs/smx2rst.py
imports: import argparse
  import json
  import logging
  import os
  import re
  import sys
  import typing
  from pathlib import Path
  import yaml
  from mergedeep import merge
label_desc: Use image node_id 6 for calling the Smx2Rst obj's underlying member method code with example usage: obj.set_table_dims(container, rel_prefix) without return types