code: def checkpoints_from_pb(
      experiment: Experiment,
      checkpoints_pb,  # TODO(andreas): should be RepeatedCompositeFieldContainer[pb.Checkpoint], but that throws TypeError
  ) -> CheckpointList:
      lst = CheckpointList()
      for chk_pb in checkpoints_pb:
          lst.append(checkpoint_from_pb(experiment, chk_pb))
      return lst
  
imports: import datetime
  import json
  from typing import List, Dict, Any, Optional, MutableMapping
  from google.protobuf import timestamp_pb2
  from .servicepb import keepsake_pb2
  from .experiment import Experiment
  from .checkpoint import Checkpoint, PrimaryMetric, CheckpointList
label_desc: Use image node_id 4 for calling a global function with example usage: checkpoints_from_pb(experiment, checkpoints_pb) and returns: lst