class_docstr: Basic tests to count the number of examples/episodes and to check a few utterances.
  
  Manual check of the number of episodes and examples:
  >>> import json
  >>> for datatype in ['train', 'valid', 'test']:
  >>>    with open(f'data/blended_skill_talk/{datatype}.json') as f:
  >>>        data = json.load(f)
  >>>    num_episodes = len(data)
  >>>    num_examples = sum([len(d['dialog']) // 2 for d in data])
  >>>    print(f'Number of episodes: {num_episodes:d}')
  >>>    print(f'Number of examples: {num_examples:d}')
  
  Output of manual check:
  Number of episodes: 4819
  Number of examples: 27018
  Number of episodes: 1009
  Number of examples: 5651
  Number of episodes: 980
  Number of examples: 5482
class_docstr_tok: ["Basic","tests","to","count","the","number","of","examples\/episodes","and","to","check","a","few","utterances",".","Manual","check","of","the","number","of","episodes","and","examples",":",">",">",">","import","json",">",">",">","for","datatype","in","[","'train","'",",","'valid","'",",","'test","'","]",":",">",">",">","with","open","(","f'data\/blended_skill_talk\/","{","datatype","}",".json","'",")","as","f",":",">",">",">","data","=","json.load","(","f",")",">",">",">","num_episodes","=","len","(","data",")",">",">",">","num_examples","=","sum","(","[","len","(","d","[","'dialog","'","]",")","\/\/","2","for","d","in","data","]",")",">",">",">","print","(","f'Number","of","episodes",":","{","num_episodes",":","d","}","'",")",">",">",">","print","(","f'Number","of","examples",":","{","num_examples",":","d","}","'",")","Output","of","manual","check",":","Number","of","episodes",":","4819","Number","of","examples",":","27018","Number","of","episodes",":","1009","Number","of","examples",":","5651","Number","of","episodes",":","980","Number","of","examples",":","5482"]
code: def test_counts(self):
      with testing_utils.tempdir() as tmpdir:
          data_path = tmpdir
  
          opts_episodes_and_examples = [
              ({"datatype": "train"}, 4819, 27018),
              ({"datatype": "valid"}, 1009, 5651),
              ({"datatype": "test"}, 980, 5482),
          ]
          for (
              kwargs,
              num_episodes,
              num_examples,
          ) in opts_episodes_and_examples:
              all_kwargs = {
                  **kwargs,
                  "task": "blended_skill_talk",
                  "datapath": data_path,
              }
              parser = setup_args()
              parser.set_defaults(**all_kwargs)
              opt = parser.parse_args([])
              agent = RepeatLabelAgent(opt)
              teacher = create_task(opt, agent).get_task_agent()
              self.assertEqual(teacher.num_episodes(), num_episodes)
              self.assertEqual(teacher.num_examples(), num_examples)
  
imports: import unittest
  from unittest.mock import patch
  import parlai.utils.testing
  from parlai.agents.repeat_label.repeat_label import RepeatLabelAgent
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.worlds import create_task
  from parlai.scripts.display_data import setup_args
  from parlai.tasks.blended_skill_talk.agents import ContextGenerator
  from parlai.tasks.blended_skill_talk.worlds import InteractiveWorld, _load_personas
label_desc: Use image node_id 1 for calling the TestBlendedSkillTalkTeacher obj's underlying member method code with example usage: obj.test_counts() without return types