class_docstr: The Empathetic Dialogues dataset from this paper:
  https://arxiv.org/abs/1811.00207
  
  Code is adapted from:
  https://github.com/facebookresearch/EmpatheticDialogues
class_docstr_tok: ["The","Empathetic","Dialogues","dataset","from","this","paper",":","https",":","\/\/arxiv.org\/abs\/1811.00207","Code","is","adapted","from",":","https",":","\/\/github.com\/facebookresearch\/EmpatheticDialogues"]
docstr: Applies following filters to select instances from self.instances
docstr_tok: ["Applies","following","filters","to","select","instances","from","self.instances"]
code: def filter_instances(self, instances):
      """Applies following filters to select instances from self.instances"""
  
      # TODO: Write code to only keep the better instances for few shot prompting
      # The given prompt is too short
      # def short_prompt(instance: Instance): return len(instance.input)<20
  
      # The conversation has less than 6 utterances (6 is max)
      # def short_convo(reference: DialogueReference): return len(reference.output)<6
  
      # The conversation has less than 6 utterances (6 is max)
      # def short_convo(instance: Instance): return len(instance.references)<6
  
      # instances = filter()
      # reference conversation length filter
      # instances = [i for i in instances if i.references]
  
      return instances
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/scenarios/dialogue_scenarios.py
imports: import csv
  import os
  import pandas
  from dataclasses import dataclass
  from typing import Dict, List, Optional
  from helm.common.general import ensure_file_downloaded
  from helm.common.hierarchical_logger import hlog
  from .scenario import Scenario, Instance, Reference, TRAIN_SPLIT, VALID_SPLIT, TEST_SPLIT, CORRECT_TAG, Input, Output
label_desc: Use image node_id 4 for calling the EmpatheticDialoguesScenario obj's underlying member method code with example usage: obj.filter_instances(instances) and returns: instances