code: def _get_current_vars(diffbase=None):
      """Returns all current trainable, global, and savable variables.
  
      Args:
        diffbase: A dictionary of lists variables to diffbase. The allowed keys are:
        "trainable", "global" and "savable".
  
      Returns:
        A dictionary containing the current trainable, global and savable variables.
        The expected keys are: "trainable", "global" and "savable".
      """
  
      trainable_vars = tf_compat.v1.trainable_variables()
      global_vars = tf_compat.v1.global_variables()
      savable_vars = tf_compat.v1.get_collection(
          tf_compat.v1.GraphKeys.SAVEABLE_OBJECTS
      )
  
      # Since newly created variables are appended to the global collections, we can
      # obtain the newer variables by taking slices of the ends of the collections.
      if diffbase:
          if "trainable" in diffbase:
              trainable_vars = trainable_vars[
                  len(diffbase["trainable"]) :
              ]
          if "global" in diffbase:
              global_vars = global_vars[len(diffbase["global"]) :]
          if "savable" in diffbase:
              savable_vars = savable_vars[len(diffbase["savable"]) :]
  
      return {
          "trainable": trainable_vars,
          "global": global_vars,
          "savable": savable_vars,
      }
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import contextlib
  import copy
  import functools
  import inspect
  import os
  from absl import logging
  from adanet import ensemble
  from adanet import subnetwork
  from adanet import tf_compat
  from adanet.core.architecture import _Architecture
  from adanet.core.eval_metrics import _EnsembleMetrics
  from adanet.core.eval_metrics import _SubnetworkMetrics
  from adanet.core.summary import monkey_patched_summaries
  import tensorflow.compat.v1
  import tensorflow.compat.v2
label_desc: Use image node_id 7 for calling a global function with example usage: _get_current_vars(diffbase) and returns: dict