code: def _get_table_from_da(da):
      """Converts a dialogue act from the cs_restaurant dataset into a table row."""
      # DA format example: intent(slot1='first value',slot2=val2)
      intent, slots = da.split("(", 1)  # split intent and slots
      slots = slots[:-1]  # remove closing ')'
      # Start with intent (always present)
      da_as_table = [
          {
              "column_header": "intent",
              "row_number": 1,
              "content": intent,
          }
      ]
      # Add slots (requested values have the value “?”)
      for slot_val in slots.split(","):
          if "=" in slot_val:
              slot, value = slot_val.split("=", 1)
          else:
              slot = slot_val
              value = "?"
          if value.startswith("'"):
              value = value[1:-1]
          da_as_table.append(
              {
                  "column_header": slot,
                  "row_number": 1,
                  "content": value,
              }
          )
      return da_as_table
  
file_path: datasets/tensorflow_datasets/structured/cs_restaurants/cs_restaurants.py
imports: from __future__ import annotations
  import json
  from etils import epath
  import numpy
  import tensorflow_datasets.public_api
label_desc: Use image node_id 1 for calling a global function with example usage: _get_table_from_da(da) and returns: da_as_table