code: def _update_user_inputs(kwargs, default_parameters, check_parameters):
      """Update keyword parameters with user inputs if applicable.
  
      Parameters
      ----------
      kwargs : :obj:`dict`
          Keyword parameters passed to `load_confounds_strategy`.
  
      default_parameters : :obj:`dict`
          Default parameters for the selected pre-set strategy.
  
      check_parameters : :obj:`list`
          List of parameters that are applicable to the selected pre-set
          strategy.
  
      Returns
      -------
      parameters : :obj:`dict`
          Updated valid parameters for `load_confounds`.
  
      not_needed : :obj:`list`
          List of parameters that are not applicable to the selected
          pre-set strategy.
      """
      parameters = default_parameters.copy()
      # update the parameter with user input
      not_needed = []
      for key in check_parameters:
          value = kwargs.pop(key, None)  # get user input
          if value is not None:
              parameters[key] = value
          # global_signal parameter is not in default strategy, but
          # applicable to every strategy other than compcor
          # global signal strategy will only be added if user has passed a
          # recognisable value to the global_signal parameter
          if key == "global_signal":
              if isinstance(value, str):
                  parameters["strategy"] += ("global_signal",)
              else:  # remove global signal if not updated
                  parameters.pop("global_signal", None)
      # collect remaining parameters in kwargs that are not needed
      not_needed = list(kwargs.keys())
      return parameters, not_needed
  
imports: import warnings
  from .None import load_confounds
label_desc: Use image node_id 2 for calling a global function with example usage: _update_user_inputs(kwargs, default_parameters, check_parameters) and returns: parameters,  not_needed