code: def load_model_weights(self, state, model, cfg):
      if "_ema" in state["model"]:
          del state["model"]["_ema"]
      model.load_state_dict(state["model"], strict=True)
  
file_path: fairseq/examples/data2vec/models/data2vec_image_classification.py
imports: import logging
  from dataclasses import dataclass
  from typing import Any
  from omegaconf import II, MISSING
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import checkpoint_utils, tasks
  from fairseq.dataclass import FairseqDataclass
  from fairseq.models import BaseFairseqModel, register_model
label_desc: Use image node_id 2 for calling the Data2VecImageClassificationModel obj's underlying member method code with example usage: obj.load_model_weights(state, model, cfg) without return types