code: def test_offline_sync(self, environment):
      with tmp_context() as tmp:
          # create run in offline mode
          run = neptune.init_run(
              mode="offline",
              project=environment.project,
              **DISABLE_SYSLOG_KWARGS,
          )
          # assign some values
          key = self.gen_key()
          val = fake.word()
          run[key] = val
  
          # and some file
          key2 = self.gen_key()
          val2 = File.from_content(b"dummybytes")
          run[key2].upload(val2)
  
          # and stop it
          run.stop()
  
          # run asynchronously
          result = runner.invoke(
              sync, ["--path", tmp, "-p", environment.project]
          )
          assert result.exit_code == 0
  
          # we'll have to parse sync output to determine short_id
          sys_id_found = re.search(
              self.SYNCHRONIZED_SYSID_RE, result.stdout
          )
          assert len(sys_id_found.groups()) == 1
          sys_id = sys_id_found.group(1)
  
          run2 = neptune.init_run(
              with_id=sys_id, project=environment.project
          )
          assert run2[key].fetch() == val
          run2[key2].download()
          with open(f"{tmp}/{key2.split('/')[-1]}.bin", "rb") as file:
              assert file.read() == b"dummybytes"
          run2.stop()
  
imports: import json
  import os
  import re
  from pathlib import Path
  import pytest
  from click.testing import CliRunner
  import neptune
  from neptune.cli import sync
  from neptune.cli.commands import clear
  from neptune.common.exceptions import NeptuneException
  from neptune.types import File
  from tests.e2e.base import AVAILABLE_CONTAINERS, BaseE2ETest, fake
  from tests.e2e.utils import DISABLE_SYSLOG_KWARGS, initialize_container, reinitialize_container, tmp_context
label_desc: Use image node_id 3 for calling the TestSync obj's underlying member method code with example usage: obj.test_offline_sync(environment) without return types