code: def from_data_row(cls, data_row: DataRow):
      data_row_dict = data_row.to_dict()
      return PartialDataRow(
          **{k: data_row_dict[k] for k in cls.get_fields()}
      )
  
imports: import json
  import numpy
  import torch
  from dataclasses import dataclass
  from typing import Union, List, Dict, Optional
  from transformers.models.bert.tokenization_bert import whitespace_tokenize
  from transformers.tokenization_utils_base import TruncationStrategy
  from jiant.tasks.lib.templates.squad_style import utils
  from jiant.shared.constants import PHASE
  from jiant.tasks.core import BaseExample, BaseDataRow, BatchMixin, Task, TaskTypes
  from jiant.utils.python.datastructures import ExtendedDataClassMixin
  from jiant.utils.display import maybe_tqdm
  import logging
label_desc: Use image node_id 1 for calling the PartialDataRow obj's underlying member method code with example usage: obj.from_data_row(cls, data_row) and returns: PartialDataRow