code: def get_regularization_loss(
      scope=None, name="total_regularization_loss"
  ):
      """Gets the total regularization loss.
  
      Args:
        scope: An optional scope name for filtering the losses to return.
        name: The name of the returned tensor.
  
      Returns:
        A scalar regularization loss.
      """
      losses = get_regularization_losses(scope)
      if losses:
          return math_ops.add_n(losses, name=name)
      else:
          return constant_op.constant(0.0)
  
file_path: tensorflow/tensorflow/python/ops/losses/util.py
imports: from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import confusion_matrix
  from tensorflow.python.ops import math_ops
  from tensorflow.python.util import tf_contextlib
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 7 for calling a global function with example usage: get_regularization_loss(scope, name) and returns: math_ops, constant_op