class_docstr: Model loader is responsible for loading shared model types.
  
  Attributes:
    construct_fn: A callable which creates the model instance. The callable
      should take no args as input (typically a closure is used to capture
      necessary parameters).
    tags: Optional model tags (e.g. 'serve' for serving or 'eval' for
      EvalSavedModel).
class_docstr_tok: ["Model","loader","is","responsible","for","loading","shared","model","types",".","Attributes",":","construct_fn",":","A","callable","which","creates","the","model","instance",".","The","callable","should","take","no","args","as","input","(","typically","a","closure","is","used","to","capture","necessary","parameters",")",".","tags",":","Optional","model","tags","(","e.g",".","'serve","'","for","serving","or","'eval","'","for","EvalSavedModel",")","."]
docstr: Wraps actual construct fn to allow for load time metrics.
docstr_tok: ["Wraps","actual","construct","fn","to","allow","for","load","time","metrics","."]
code: def _construct_fn_with_load_time(
      self, model_load_time_callback: Callable[[int], None]
  ) -> Callable[[], Any]:
      """Wraps actual construct fn to allow for load time metrics."""
  
      def with_load_times():
          start_time = datetime.datetime.now()
          model = self.construct_fn()
          end_time = datetime.datetime.now()
          model_load_time_callback(
              int((end_time - start_time).total_seconds())
          )
          return model
  
      return with_load_times
  
imports: import abc
  import datetime
  import operator
  from typing import Any, Callable, Dict, Iterable, List, MutableMapping, NamedTuple, Optional, TypeVar, Tuple, Union
  from apache_beam.utils import shared
  import numpy
  import six
  import tensorflow
  from tensorflow_model_analysis.proto import metrics_for_slice_pb2
label_desc: Use image node_id 3 for calling the ModelLoader obj's underlying member method code with example usage: obj._construct_fn_with_load_time(model_load_time_callback) and returns: with_load_times, model