code: def _add_license_header(dir, file_name):
      with open(os.path.join(dir, file_name), "r") as original_file:
          original_data = original_file.read()
          tmp_file_name = file_name + ".tmp"
          with open(os.path.join(dir, tmp_file_name), "w") as tmp_file:
              tmp_file.write(
                  "################################################################################\n"
                  "#  Licensed to the Apache Software Foundation (ASF) under one\n"
                  "#  or more contributor license agreements.  See the NOTICE file\n"
                  "#  distributed with this work for additional information\n"
                  "#  regarding copyright ownership.  The ASF licenses this file\n"
                  "#  to you under the Apache License, Version 2.0 (the\n"
                  '#  "License"); you may not use this file except in compliance\n'
                  "#  with the License.  You may obtain a copy of the License at\n"
                  "#\n"
                  "#      http://www.apache.org/licenses/LICENSE-2.0\n"
                  "#\n"
                  "#  Unless required by applicable law or agreed to in writing, software\n"
                  '#  distributed under the License is distributed on an "AS IS" BASIS,\n'
                  "#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
                  "#  See the License for the specific language governing permissions and\n"
                  "# limitations under the License.\n"
                  "################################################################################\n"
              )
              tmp_file.write(original_data)
      if os.path.exists(os.path.join(dir, file_name)):
          os.remove(os.path.join(dir, file_name))
      os.rename(
          os.path.join(dir, tmp_file_name), os.path.join(dir, file_name)
      )
  
file_path: flink/flink-python/pyflink/gen_protos.py
imports: from __future__ import absolute_import
  from __future__ import print_function
  import glob
  import logging
  import multiprocessing
  import os
  import platform
  import shutil
  import subprocess
  import sys
  import time
  import warnings
  import pkg_resources
label_desc: Use image node_id 3 for calling a global function with example usage: _add_license_header(dir, file_name) without return types