code: def change_imports_in_py(
      file_content: bytes, name_before: str, name_after: str
  ) -> bytes:
      name_before_without_suffix = os.path.splitext(name_before)[0]
      name_after_without_suffix = os.path.splitext(name_after)[0]
      return file_content.replace(
          f"import {name_before_without_suffix} as".encode(),
          f"import {name_after_without_suffix} as".encode(),
      )
  
file_path: datasets/tensorflow_datasets/proto/build_tf_proto.py
imports: import enum
  import os
  import re
  import subprocess
  from absl import app
  from etils import epath
  import requests
label_desc: Use image node_id 7 for calling a global function with example usage: change_imports_in_py(file_content, name_before, name_after) and returns: file_content