code: def compute_functional_name(test_params_dict):
      def camel_case_to_snake_case(camel_case_str):
          return re.sub(r"(?<!^)(?=[A-Z])", "_", camel_case_str).lower()
  
      if "cpp_options_args" in test_params_dict:
          # Expected format for `cpp_options_args`: `F::FunctionalFuncOptions(...)`
          # Example output: `binary_cross_entropy`
          return camel_case_to_snake_case(
              test_params_dict["cpp_options_args"]
              .split("(")[0]
              .replace("F::", "")
              .replace("FuncOptions", "")
          )
      elif "cpp_function_call" in test_params_dict:
          # Expected format for `cpp_function_call`: `F::functional_name(...)`
          # Example output: `binary_cross_entropy`
          return (
              test_params_dict["cpp_function_call"]
              .split("(")[0]
              .replace("F::", "")
          )
      else:
          raise RuntimeError(
              "`cpp_options_args` or `cpp_function_call` entry must be present in test params dict:\n{}".format(
                  pprint.pformat(test_params_dict)
              )
          )
  
file_path: pytorch/test/cpp_api_parity/functional_impl_check.py
imports: import tempfile
  from string import Template
  import re
  import pprint
  import os
  import torch
  from cpp_api_parity.utils import TorchNNFunctionalTestParams, TORCH_NN_COMMON_TEST_HARNESS, compile_cpp_code_inline, set_python_tensors_requires_grad, move_python_tensors_to_device, add_test, compute_cpp_args_construction_stmts_and_forward_arg_symbols, serialize_arg_dict_as_script_module, compute_arg_dict, decorate_test_fn, compute_temp_file_path, generate_error_msg, is_torch_nn_functional_test, try_remove_folder
  from cpp_api_parity.sample_functional import SAMPLE_FUNCTIONAL_CPP_SOURCE
label_desc: Use image node_id 3 for calling a global function with example usage: compute_functional_name(test_params_dict) and returns: re, camel_case_to_snake_case, test_params_dict