code: def file_specific_replacement(
      filepath, search_string, replace_string, strict=False
  ):
      with openf(filepath, "r+") as f:
          contents = f.read()
          if strict:
              contents = re.sub(
                  rf"\b({re.escape(search_string)})\b",
                  lambda x: replace_string,
                  contents,
              )
          else:
              contents = contents.replace(search_string, replace_string)
          f.seek(0)
          f.write(contents)
          f.truncate()
  
imports: import argparse
  import fnmatch
  import re
  import shutil
  import sys
  import os
  from .None import constants
  from .cuda_to_hip_mappings import CUDA_TO_HIP_MAPPINGS
  from .cuda_to_hip_mappings import MATH_TRANSPILATIONS
  from typing import Dict, List, Iterator, Optional
  from collections.abc import Mapping, Iterable
  from enum import Enum
label_desc: Use image node_id 22 for calling a global function with example usage: file_specific_replacement(filepath, search_string, replace_string, strict) without return types