code: def _infer_fields(coll, name, embedded_doc_type):
      fields = _do_infer_fields(coll, name, embedded_doc_type)
  
      list_field = _LABEL_LIST_FIELDS.get(embedded_doc_type, None)
  
      for field in fields:
          if (
              list_field is not None
              and field.get("name", None) == list_field
              and field.get("ftype", None)
              == "fiftyone.core.fields.ListField"
          ):
              list_path = name + "." + list_field
              ltype = embedded_doc_type[:-1]  # remove "s"
              field[
                  "subfield"
              ] = "fiftyone.core.fields.EmbeddedDocumentField"
              field["embedded_doc_type"] = ltype
              field["fields"] = _do_infer_fields(coll, list_path, ltype)
      return fields
  
label_desc: Use image node_id 3 for calling a global function with example usage: _infer_fields(coll, name, embedded_doc_type) and returns: fields