def init(cls, typ, class2type):
        """
        Defines custom fields in the value factory so that the importer can find them
        @param typ
        @param class2type
        """
        field = typ.getField(cls.FIELD_NAME)
        class2type.put( StrStrHashMap , typ )
        typ.setComponentType( StrStrHashMap )
        typ.setImportExportHelper( StrStrHashMapSerializer(typ, field))
        typ.putValidator(field, Validator_object.get(1))
        typ.lock()
def setup_args(parser=None):
    if parser is None:
        parser = ParlaiParser(True, True, 'Check tasks for common errors')
    # Get command line arguments
    parser.add_argument('-ltim', '--log-every-n-secs', type=float, default=2)
    parser.add_argument('-d', '--display-examples', type='bool', default=False)
    parser.set_defaults(datatype='train:stream:ordered')
    return parser