(data_type, n_src_features, n_tgt_features)
Args:
        data_type: type of the source input. Options are [text|img|audio].
        n_src_features: the number of source features to
            create `torchtext.data.Field` for.
        n_tgt_features: the number of target features to
            create `torchtext.data.Field` for.

    Returns:
        A dictionary whose keys are strings and whose values are the
        corresponding Field objects.
Args:
        data_type: type of the source input. Options are [text|img|audio].
        n_src_features: the number of source features to
            create `torchtext.data.Field` for.
        n_tgt_features: the number of target features to
            create `torchtext.data.Field` for.
Args : data_type : type of the source input . Options are [ text|img|audio ] . n_src_features : the number of source features to create torchtext . data . Field for . n_tgt_features : the number of target features to create torchtext . data . Field for .
def get_fields(data_type, n_src_features, n_tgt_features):
    """
    Args:
        data_type: type of the source input. Options are [text|img|audio].
        n_src_features: the number of source features to
            create `torchtext.data.Field` for.
        n_tgt_features: the number of target features to
            create `torchtext.data.Field` for.

    Returns:
        A dictionary whose keys are strings and whose values are the
        corresponding Field objects.
    """
    if data_type == 'text':
        return TextDataset.get_fields(n_src_features, n_tgt_features)
    elif data_type == 'img':
        return ImageDataset.get_fields(n_src_features, n_tgt_features)
    elif data_type == 'audio':
        return AudioDataset.get_fields(n_src_features, n_tgt_features)
    else:
        raise ValueError("Data type not implemented")
def get_fields ( data_type , n_src_features , n_tgt_features ) : if data_type == 'text' : return TextDataset . get_fields ( n_src_features , n_tgt_features ) elif data_type == 'img' : return ImageDataset . get_fields ( n_src_features , n_tgt_features ) elif data_type == 'audio' : return AudioDataset . get_fields ( n_src_features , n_tgt_features ) else : raise ValueError ( "Data type not implemented" )