code: def _test_checkpoints_creation(
      self,
      environment,
      log_checkpoints,
      expected_checkpoints=None,
      expected_checkpoints_number=None,
      additional_training_args=None,
      checkpoints_key="",
  ):
      if expected_checkpoints is not None:
          expected_checkpoints.update({"/", "model"})
  
      if additional_training_args is None:
          additional_training_args = {}
  
      def run_test(run):
          callback = NeptuneCallback(
              run=run, log_checkpoints=log_checkpoints
          )
          training_args = self._trainer_default_attributes
          training_args["args"] = TrainingArguments(
              "model",
              report_to=[],
              num_train_epochs=500,
              save_steps=1000,
              save_strategy="steps",
              **additional_training_args,
          )
          trainer = Trainer(**training_args, callbacks=[callback])
          trainer.train()
  
      def assert_metadata_structure(run):
          assert run.exists("finetuning/checkpoints")
          assert run["finetuning/train/epoch"].fetch() == 500
          with tmp_context():
              run[f"finetuning/checkpoints/{checkpoints_key}"].download(
                  "checkpoints.zip"
              )
  
              with ZipFile("checkpoints.zip") as handler:
                  subdirectories = set(
                      [os.path.dirname(x) for x in handler.namelist()]
                  )
  
                  if expected_checkpoints_number is not None:
                      assert (
                          len(subdirectories)
                          == expected_checkpoints_number
                      )
  
                  if expected_checkpoints is not None:
                      assert subdirectories == expected_checkpoints
                  handler.extractall(".")
  
      self._test_with_run_initialization(
          environment, pre=run_test, post=assert_metadata_structure
      )
  
imports: import os
  import time
  from zipfile import ZipFile
  import numpy
  import pytest
  import torch
  from faker import Faker
  from transformers import PretrainedConfig, PreTrainedModel, Trainer, TrainingArguments
  from transformers.integrations import NeptuneCallback, NeptuneMissingConfiguration
  from transformers.utils import logging
  from neptune import init_run
  from neptune.metadata_containers.metadata_containers_table import TableEntry
  from tests.e2e.base import BaseE2ETest
  from tests.e2e.utils import catch_time, modified_environ, tmp_context
label_desc: Use image node_id 18 for calling the TestHuggingFace obj's underlying member method code with example usage: obj._test_checkpoints_creation(environment, log_checkpoints, expected_checkpoints, expected_checkpoints_number, additional_training_args, checkpoints_key) without return types