code: def set_default_keyvalue(key, value, d, inplace=True, log=logger):
      """Set default value for dict if key is not defined
  
      :param key: key name
      :type key: str
      :param value: key value
      :type value: object
      :param d: target dict object to be updated
      :type d: dict
      :param inplace: whether update in place.
      :type inplace: boolean
      :param log: logger obj to trace where the function is called, default is aup.utils
      :type log: logging.Logger
      :return: updated dict
      :rtype: dict
      """
      if not inplace:
          d = d.copy()
      if key not in d:
          log.warning("Using default value %s for %s" % (value, key))
          d[key] = value
      return d
  
imports: from __future__ import print_function
  import sys
  import logging
  import os
  from os import path
  from six.moves import input
  from six.moves.configparser import ConfigParser
  import paramiko
  from paramiko import SFTPClient
  from .aup import BasicConfig, print_result
label_desc: Use image node_id 8 for calling a global function with example usage: set_default_keyvalue(key, value, d, inplace, log) and returns: d