class_docstr: LM Chunk Teacher, base.
  
  Provides functionality for subclassed teachers for extracting data from world log
  files, generated via `generate_lm_data.py`
class_docstr_tok: ["LM","Chunk","Teacher",",","base",".","Provides","functionality","for","subclassed","teachers","for","extracting","data","from","world","log","files",",","generated","via","`","generate_lm_data.py","`"]
code: def add_cmdline_args(
      cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
  ) -> ParlaiParser:
      ChunkTeacher.add_cmdline_args(parser, partial_opt)
      agent = parser.add_argument_group("LM Task Arguments")
      agent.add_argument(
          "--root-dir",
          type=str,
          default=None,
          help="Root directory with generated world logs.",
      )
      agent.add_argument(
          "--validation-data-indices",
          type=str,
          default="",
          help="comma separated list of validation data indices",
      )
      agent.add_argument(
          "--shared-knowledge-entity",
          type="bool",
          help="If True, only include examples with an entity in the knowledge that is also in the label",
          default=False,
      )
      agent.add_argument(
          "--min-knowledge-length",
          type=int,
          help="minimum length of the knowledge required to include the example. Default -1 means no min length",
          default=5,
      )
      agent.add_argument(
          "--min-knowledge-overlap",
          type=float,
          help="minimum overlap between knowledge and target sentence. Default 0 means no overlap required.",
          default=0,
      )
      agent.add_argument(
          "--skip-empty-context",
          type=bool,
          help="whether to exclude examples with empty context.",
          default=False,
      )
      agent.add_argument(
          "--exclude-retrieved-docs",
          type="bool",
          default=False,
          help="specify to not include retrieved docs in the episodes. hopefully reduces memory footprint.",
      )
      return parser
  
imports: from abc import ABC, abstractmethod
  import os
  from typing import Tuple, List, Optional, Any, Dict
  import random
  from parlai.core.message import Message
  from parlai.core.metrics import F1Metric, BleuMetric, RougeMetric, AverageMetric, ExactMatchMetric, normalize_answer
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.teachers import ChunkTeacher, ChunkOutput
  import parlai.tasks.wizard_of_internet.constants
  from parlai.utils.conversations import Conversations
  from parlai.utils.data import DatatypeHelper
  import parlai.utils.logging
  from parlai.tasks.wizard_of_wikipedia.agents import TOKEN_KNOWLEDGE, TOKEN_END_KNOWLEDGE
  from projects.seeker.utils import extract_entities, remove_possible_title_from_text
label_desc: Use image node_id 2 for calling the AbstractLMChunkTeacher obj's underlying member method code with example usage: obj.add_cmdline_args(cls, parser, partial_opt) and returns: parser