code: def amv_file(tmp_path_factory):
      """Create an AMV file."""
      test_file = tmp_path_factory.mktemp("data") / "fci_l2_amv.nc"
  
      with Dataset(test_file, "w") as nc:
          # Create dimensions
          nc.createDimension("number_of_winds", 50000)
  
          # add global attributes
          nc.data_source = "test_data_source"
          nc.platform = "test_platform"
  
          # Add datasets
          latitude = nc.createVariable(
              "latitude", np.float32, dimensions=("number_of_winds",)
          )
          latitude[:] = np.arange(50000)
  
          longitude = nc.createVariable(
              "y", np.float32, dimensions=("number_of_winds",)
          )
          longitude[:] = np.arange(50000)
  
          qi = nc.createVariable("product_quality", np.int8)
          qi[:] = 99.0
  
          test_dataset = nc.createVariable(
              "test_dataset", np.float32, dimensions="number_of_winds"
          )
          test_dataset[:] = np.ones(50000)
          test_dataset.test_attr = "attr"
          test_dataset.units = "test_units"
  
          mtg_geos_projection = nc.createVariable(
              "mtg_geos_projection", int, dimensions=()
          )
          mtg_geos_projection.longitude_of_projection_origin = 0.0
          mtg_geos_projection.semi_major_axis = 6378137.0
          mtg_geos_projection.inverse_flattening = 298.257223563
          mtg_geos_projection.perspective_point_height = 35786400.0
      return test_file
  
imports: import os
  import unittest
  import uuid
  from contextlib import suppress
  from unittest import mock
  import numpy
  import pytest
  from netCDF4 import Dataset
  from pyresample import geometry
  from satpy.readers.fci_l2_nc import FciL2NCAMVFileHandler, FciL2NCFileHandler, FciL2NCSegmentFileHandler
  from satpy.tests.utils import make_dataid
label_desc: Use image node_id 1 for calling a global function with example usage: amv_file(tmp_path_factory) and returns: test_file