code: def go_getters_and_setters(
      gotype: str, schema: Schema, spec: List[FieldSpec]
  ) -> List[str]:
      lines = []  # type: List[str]
  
      if len(spec) < 1:
          return lines
  
      x = gotype[0].lower()
  
      for field, type, tag in spec:
          defaulted_type, default, required = get_defaulted_type(
              schema, tag, type
          )
  
          if not field.startswith("Raw"):
              raise AssertionError(
                  f'{gotype} has field {field} which doesn\'t start with "Raw"; all fields should '
                  'start with "Raw" and the getter will be the primary API for accessing those '
                  "values.  When the field is a pointer-type with a non-nil default type, the getter "
                  "will be a non-pointer (automatic dereferencing) for use after WithDefaults() is "
                  "used to fill the default values."
              )
  
          getter = field[len("Raw") :]
  
          if defaulted_type == type:
              # Getter for nonpointer field.
              lines.append("")
              lines.append(f"func ({x} {gotype}) {getter}() {type} {{")
              lines.append(f"\treturn {x}.{field}")
              lines.append("}")
              lines.append("")
  
              # Setter for nonpointer field.
              lines.append(
                  f"func ({x} *{gotype}) Set{getter}(val {type}) {{"
              )
              lines.append(f"\t{x}.{field} = val")
              lines.append("}")
  
          else:
              # Getter for pointer field.
              lines.append("")
              lines.append(
                  f"func ({x} {gotype}) {getter}() {defaulted_type} {{"
              )
              lines.append(f"\tif {x}.{field} == nil {{")
              lines.append(
                  f'\t\tpanic("You must call WithDefaults on {gotype} before .{getter}")'
              )
              lines.append("\t}")
              lines.append(f"\treturn *{x}.{field}")
              lines.append("}")
              lines.append("")
  
              # Setter for pointer field.
              lines.append(
                  f"func ({x} *{gotype}) Set{getter}(val {defaulted_type}) {{"
              )
              lines.append(f"\t{x}.{field} = &val")
              lines.append("}")
  
      return lines
  
imports: import argparse
  import json
  import os
  import re
  import sys
  from typing import List, Optional, Tuple
label_desc: Use image node_id 9 for calling a global function with example usage: go_getters_and_setters(gotype, schema, spec) and returns: lines, lines