parameters: (ops, positive_filter)
return_statement: return ops
docstring: Get the ops passing the given filter.
  
    Args:
      ops: an object convertible to a list of tf.Operation.
      positive_filter: a function deciding where to keep an operation or not.
        If True, all the operations are returned.
    Returns:
      A list of selected tf.Operation.
    Raises:
      TypeError: if ops cannot be converted to a list of tf.Operation.
docstring_summary: Get the ops passing the given filter.
docstring_tokens: Get the ops passing the given filter .
function: def filter_ops(ops, positive_filter):
    """Get the ops passing the given filter.
  
    Args:
      ops: an object convertible to a list of tf.Operation.
      positive_filter: a function deciding where to keep an operation or not.
        If True, all the operations are returned.
    Returns:
      A list of selected tf.Operation.
    Raises:
      TypeError: if ops cannot be converted to a list of tf.Operation.
    """
    ops = util.make_list_of_op(ops)
    if positive_filter is not True:  # pylint: disable=g-explicit-bool-comparison
      ops = [op for op in ops if positive_filter(op)]
    return ops
function_tokens: def filter_ops ( ops , positive_filter ) : ops = util . make_list_of_op ( ops ) if positive_filter is not True : # pylint: disable=g-explicit-bool-comparison ops = [ op for op in ops if positive_filter ( op ) ] return ops