code: def test_tweet_metadata(tmp_path, infile):
      ref_fn = subdir / "tweets.20150430-223406.tweet.csv.ref"
      fields = [
          "created_at",
          "favorite_count",
          "id",
          "in_reply_to_status_id",
          "in_reply_to_user_id",
          "retweet_count",
          "retweeted",
          "text",
          "truncated",
          "user.id",
      ]
  
      outfn = tmp_path / "tweets.20150430-223406.tweet.csv"
      json2csv(infile, outfn, fields, gzip_compress=False)
      assert files_are_identical(outfn, ref_fn)
  
file_path: nltk/nltk/test/unit/test_json2csv_corpus.py
imports: from pathlib import Path
  import pytest
  from nltk.corpus import twitter_samples
  from nltk.twitter.common import json2csv, json2csv_entities
label_desc: Use image node_id 4 for calling a global function with example usage: test_tweet_metadata(tmp_path, infile) without return types