code: def _prune_invalid_ids(sparse_ids, sparse_weights):
      """Prune invalid IDs (< 0) from the input ids and weights."""
      is_id_valid = math_ops.greater_equal(sparse_ids.values, 0)
      if sparse_weights is not None:
          is_id_valid = math_ops.logical_and(
              is_id_valid,
              array_ops.ones_like(
                  sparse_weights.values, dtype=dtypes.bool
              ),
          )
      sparse_ids = sparse_ops.sparse_retain(sparse_ids, is_id_valid)
      if sparse_weights is not None:
          sparse_weights = sparse_ops.sparse_retain(
              sparse_weights, is_id_valid
          )
      return sparse_ids, sparse_weights
  
imports: from tensorflow.python.compat import compat
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import clip_ops
  from tensorflow.python.ops import data_flow_grad
  from tensorflow.python.ops import data_flow_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.types import core
  from tensorflow.python.util import dispatch
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 11 for calling a global function with example usage: _prune_invalid_ids(sparse_ids, sparse_weights) and returns: sparse_ids,  sparse_weights