docstr: If fg_dataset_type is present, it means we are using
  the Hateful Memes Fine Grained datasets. It is the same
  hateful memes datasets but have additional labels for
  protected groups and attack vectors. More details see:
  https://github.com/facebookresearch/fine_grained_hateful_memes
docstr_tok: ["If","fg_dataset_type","is","present",",","it","means","we","are","using","the","Hateful","Memes","Fine","Grained","datasets",".","It","is","the","same","hateful","memes","datasets","but","have","additional","labels","for","protected","groups","and","attack","vectors",".","More","details","see",":","https",":","\/\/github.com\/facebookresearch\/fine_grained_hateful_memes"]
code: def process_fg_labels(
      self, fg_dataset_type, sample_info, current_sample
  ):
      """
      If fg_dataset_type is present, it means we are using
      the Hateful Memes Fine Grained datasets. It is the same
      hateful memes datasets but have additional labels for
      protected groups and attack vectors. More details see:
      https://github.com/facebookresearch/fine_grained_hateful_memes
      """
      ds_type_to_label = {
          "attack": sample_info["top_attacks"],
          "pc": sample_info["top_protectedcats"],
          "pc_attack": sample_info["top_protectedcats"]
          + sample_info["top_attacks"],
          "hateful_pc_attack": sample_info["top_protectedcats"]
          + sample_info["top_attacks"]
          + [
              "hateful"
              if int(sample_info["label"]) == 1
              else "not_hateful"
          ],
      }
      processed = self.answer_processor(
          {"answers": ds_type_to_label[fg_dataset_type]}
      )
      current_sample.answers = processed["answers"]
      current_sample.targets = processed["answers_scores"]
  
      return current_sample
  
imports: import copy
  import os
  import numpy
  import omegaconf
  import torch
  from mmf.common.sample import Sample
  from mmf.datasets.mmf_dataset import MMFDataset
  from mmf.utils.general import get_mmf_root
  from mmf.utils.visualize import visualize_images
  from PIL import Image
  from torchvision import transforms
label_desc: Use image node_id 4 for calling the HatefulMemesFeaturesDataset obj's underlying member method code with example usage: obj.process_fg_labels(fg_dataset_type, sample_info, current_sample) and returns: current_sample