class_docstr: Class to allow subclasses wrapped in @dataclass to automatically
  cast fields to their relevant type by default.
  
  Also allows for an arbitrary intialization function to be applied
  for a given field.
class_docstr_tok: ["Class","to","allow","subclasses","wrapped","in","@","dataclass","to","automatically","cast","fields","to","their","relevant","type","by","default",".","Also","allows","for","an","arbitrary","intialization","function","to","be","applied","for","a","given","field","."]
docstr: Allows for the setting of a function to be called on the
  named parameter associated with a field during initialization,
  after __init__() completes.
  
  Args:
      field_initializer (Callable):
          The function to be called on the field
  
      **kwargs: To be passed downstream to the dataclasses.field method
  
  Returns:
      (dataclasses.Field) that contains the field_initializer and kwargs infoÎ
docstr_tok: ["Allows","for","the","setting","of","a","function","to","be","called","on","the","named","parameter","associated","with","a","field","during","initialization",",","after","__init__","(",")","completes",".","Args",":","field_initializer","(","Callable",")",":","The","function","to","be","called","on","the","field","*","*","kwargs",":","To","be","passed","downstream","to","the","dataclasses.field","method","Returns",":","(","dataclasses.Field",")","that","contains","the","field_initializer","and","kwargs","info\u00ce"]
code: def complex_initialized_dataclass_field(
      field_initializer: Callable, **kwargs
  ) -> Field:
      """
      Allows for the setting of a function to be called on the
      named parameter associated with a field during initialization,
      after __init__() completes.
  
      Args:
          field_initializer (Callable):
              The function to be called on the field
  
          **kwargs: To be passed downstream to the dataclasses.field method
  
      Returns:
          (dataclasses.Field) that contains the field_initializer and kwargs infoÎ
      """
      metadata = kwargs.get("metadata") or {}
      assert DataclassFieldCaster.COMPLEX_INITIALIZER not in metadata
      metadata[
          DataclassFieldCaster.COMPLEX_INITIALIZER
      ] = field_initializer
      kwargs["metadata"] = metadata
      return dataclass_field(**kwargs)
  
imports: from __future__ import annotations
  import csv
  import itertools
  import logging
  import math
  import sys
  import threading
  from collections import defaultdict
  from dataclasses import Field, field, fields
  from fractions import Fraction
  from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union
  import av
  import numpy
  import torch
  from iopath.common.file_io import g_pathmgr
label_desc: Use image node_id 2 for calling the DataclassFieldCaster obj's underlying member method code with example usage: obj.complex_initialized_dataclass_field(field_initializer) and returns: dataclass_field