code: def _create_instance(reviews_file, meta_file):
      logger.info("start create instances...")
      dirs, _ = os.path.split(reviews_file)
      output_file = os.path.join(dirs, "instance_output")
  
      f_reviews = open(reviews_file, "r")
      user_dict = {}
      item_list = []
      for line in f_reviews:
          line = line.strip()
          reviews_things = line.split("\t")
          if reviews_things[0] not in user_dict:
              user_dict[reviews_things[0]] = []
          user_dict[reviews_things[0]].append(
              (line, float(reviews_things[-1]))
          )
          item_list.append(reviews_things[1])
  
      f_meta = open(meta_file, "r")
      meta_dict = {}
      for line in f_meta:
          line = line.strip()
          meta_things = line.split("\t")
          if meta_things[0] not in meta_dict:
              meta_dict[meta_things[0]] = meta_things[1]
  
      f_output = open(output_file, "w")
      for user_behavior in user_dict:
          sorted_user_behavior = sorted(
              user_dict[user_behavior], key=lambda x: x[1]
          )
          for line, _ in sorted_user_behavior:
              user_things = line.split("\t")
              asin = user_things[1]
              if asin in meta_dict:
                  f_output.write(
                      "1" + "\t" + line + "\t" + meta_dict[asin] + "\n"
                  )
              else:
                  f_output.write(
                      "1" + "\t" + line + "\t" + "default_cat" + "\n"
                  )
  
      f_reviews.close()
      f_meta.close()
      f_output.close()
      return output_file
  
imports: import os
  import shutil
  import pandas
  import gzip
  import random
  import logging
  import _pickle
  from recommenders.utils.constants import SEED
  from recommenders.datasets.download_utils import maybe_download
label_desc: Use image node_id 11 for calling a global function with example usage: _create_instance(reviews_file, meta_file) and returns: output_file