code: def test_s3_existing(
      self, container: MetadataContainer, bucket, environment
  ):
      first, second, prefix = (
          self.gen_key(),
          self.gen_key(),
          f"{environment.project}/{self.gen_key()}/{type(container).__name__}",
      )
      filename, filepath = fake.file_name(), fake.file_path(
          depth=3, absolute=False
      )
  
      bucket_name, s3_client = bucket
  
      with tmp_context():
          with open(filename, "w", encoding="utf-8") as handler:
              handler.write(fake.paragraph(nb_sentences=5))
  
          os.makedirs(Path(filepath).parent, exist_ok=True)
          with open(filepath, "w", encoding="utf-8") as handler:
              handler.write(fake.paragraph(nb_sentences=5))
  
          s3_client.meta.client.upload_file(
              filename, bucket_name, f"{prefix}/{filename}"
          )
          s3_client.meta.client.upload_file(
              filepath, bucket_name, f"{prefix}/{filepath}"
          )
  
      # Track all files - "a" and "b" to first artifact
      container[first].track_files(f"s3://{bucket_name}/{prefix}/")
  
      # Track only the "a" file to second artifact
      container[second].track_files(
          f"s3://{bucket_name}/{prefix}/{filename}"
      )
      container.sync()
  
      # Add "b" file to existing second artifact
      # so it should be now identical as first
      container[second].track_files(
          f"s3://{bucket_name}/{prefix}/{filepath}",
          destination=str(PurePosixPath(filepath).parent),
      )
      container.sync()
  
      assert (
          container[first].fetch_hash()
          == container[second].fetch_hash()
      )
      assert (
          container[first].fetch_files_list()
          == container[second].fetch_files_list()
      )
  
file_path: neptune-client/tests/e2e/standard/test_artifacts.py
imports: import os
  import tempfile
  from pathlib import Path, PurePosixPath
  import pytest
  from neptune.metadata_containers import MetadataContainer
  from tests.e2e.base import AVAILABLE_CONTAINERS, BaseE2ETest, fake
  from tests.e2e.utils import tmp_context, with_check_if_file_appears
label_desc: Use image node_id 6 for calling the TestArtifacts obj's underlying member method code with example usage: obj.test_s3_existing(container, bucket, environment) without return types