code: def test_stream_file_sink(self):
      self.env.set_parallelism(2)
      ds = self.env.from_collection(
          [("ab", 1), ("bdc", 2), ("cfgs", 3), ("deeefg", 4)],
          type_info=Types.ROW([Types.STRING(), Types.INT()]),
      )
      ds.map(lambda a: a[0], Types.STRING()).add_sink(
          StreamingFileSink.for_row_format(
              self.tempdir, Encoder.simple_string_encoder()
          )
          .with_rolling_policy(
              RollingPolicy.default_rolling_policy(
                  part_size=1024 * 1024 * 1024,
                  rollover_interval=15 * 60 * 1000,
                  inactivity_interval=5 * 60 * 1000,
              )
          )
          .with_output_file_config(
              OutputFileConfig.OutputFileConfigBuilder()
              .with_part_prefix("prefix")
              .with_part_suffix("suffix")
              .build()
          )
          .build()
      )
  
      self.env.execute("test_streaming_file_sink")
  
      results = []
      import os
  
      for root, dirs, files in os.walk(self.tempdir, topdown=True):
          for file in files:
              self.assertTrue(file.startswith(".prefix"))
              self.assertTrue("suffix" in file)
              path = root + "/" + file
              with open(path) as infile:
                  for line in infile:
                      results.append(line)
  
      expected = ["deeefg\n", "bdc\n", "ab\n", "cfgs\n"]
      results.sort()
      expected.sort()
      self.assertEqual(expected, results)
  
file_path: flink/flink-python/pyflink/datastream/connectors/tests/test_file_system.py
imports: from pyflink.common import Duration
  from pyflink.common.serialization import Encoder
  from pyflink.common.typeinfo import Types
  from pyflink.datastream.connectors.file_system import FileCompactStrategy, FileCompactor, StreamingFileSink, OutputFileConfig, FileSource, StreamFormat, FileEnumeratorProvider, FileSplitAssignerProvider, RollingPolicy, FileSink, BucketAssigner
  from pyflink.testing.test_case_utils import PyFlinkStreamingTestCase
  from pyflink.util.java_utils import load_java_class
label_desc: Use image node_id 1 for calling the FileSystemTests obj's underlying member method code with example usage: obj.test_stream_file_sink() without return types