class_docstr: Merge LICENSE and LICENSES_BUNDLED.txt as a context manager
  
  LICENSE is the main PyTorch license, LICENSES_BUNDLED.txt is auto-generated
  from all the licenses found in ./third_party/. We concatenate them so there
  is a single license file in the sdist and wheels with all of the necessary
  licensing info.
docstr: Concatenate files
docstr_tok: ["Concatenate","files"]
code: def __enter__(self):
      """Concatenate files"""
  
      old_path = sys.path
      sys.path.append(third_party_path)
      try:
          from build_bundled import create_bundled
      finally:
          sys.path = old_path
  
      with open(self.f1) as f1:
          self.bsd_text = f1.read()
  
      with open(self.f1, "a") as f1:
          f1.write("\n\n")
          create_bundled(
              os.path.relpath(third_party_path),
              f1,
              include_files=self.include_files,
          )
  
imports: import sys
  import platform
  import filecmp
  import glob
  import importlib
  import json
  import os
  import shutil
  import subprocess
  import sysconfig
  import time
  from collections import defaultdict
  import setuptools.command.build_ext
  import setuptools.command.install
  import setuptools.command.sdist
  from setuptools import Extension, find_packages, setup
  from setuptools.dist import Distribution
  from tools.build_pytorch_libs import build_caffe2
  from tools.generate_torch_version import get_torch_version
  from tools.setup_helpers.cmake import CMake
  from tools.setup_helpers.env import build_type, IS_DARWIN, IS_LINUX, IS_WINDOWS
label_desc: Use image node_id 2 for calling the concat_license_files obj's underlying member method code with example usage: obj.__enter__() without return types