code: def get_task_idx(self, dataset_name):
      task_type = self.get_task_type(dataset_name)
      assert task_type in self.config.heads
      return self.config.heads[task_type][dataset_name]["task_idx"]
  
imports: import logging
  from copy import deepcopy
  from typing import Dict
  import torch
  from mmf.common.registry import registry
  from mmf.models import BaseModel
  from mmf.models.unit.unit_base_model import AttributeHead, build_detection_loss, MLP, UniTBaseModel
  from mmf.modules.encoders import TransformerEncoder
  from mmf.utils.distributed import byte_tensor_to_object
  from torch import nn, Tensor
label_desc: Use image node_id 10 for calling the UniT obj's underlying member method code with example usage: obj.get_task_idx(dataset_name) and returns: self