code: def get_structured_data(raw_output, platform, command):
      
      template_dir = get_template_dir()
      index_file = os.path.join(template_dir, "index")
      textfsm_obj = clitable.CliTable(index_file, template_dir)
      attrs = {"Command": command, "Platform": platform}
      try:
          # Parse output through template
          textfsm_obj.ParseCmd(raw_output, attrs)
          structured_data = clitable_to_dict(textfsm_obj)
          output = raw_output if structured_data == [] else structured_data
          return output
      except CliTableError:
          return raw_output
docs: Convert raw CLI output to structured data using TextFSM template.