code: def get_from_env_or_user_or_default(
      environ_cp, var_name, ask_for_var, var_default
  ):
      """Get var_name either from env, or user or default.
  
      If var_name has been set as environment variable, use the preset value, else
      ask for user input. If no input is provided, the default is used.
  
      Args:
        environ_cp: copy of the os.environ.
        var_name: string for name of environment variable, e.g. "TF_NEED_CUDA".
        ask_for_var: string for how to ask for user input.
        var_default: default value string.
  
      Returns:
        string value for var_name
      """
      var = environ_cp.get(var_name)
      if not var:
          var = get_input(ask_for_var)
          print("\n")
      if not var:
          var = var_default
      return var
  
imports: import argparse
  import errno
  import glob
  import json
  import os
  import platform
  import re
  import subprocess
  import sys
label_desc: Use image node_id 25 for calling a global function with example usage: get_from_env_or_user_or_default(environ_cp, var_name, ask_for_var, var_default) and returns: var