parameters: (self, control_inputs=True)
return_statement: return res
docstring: Remove unused ops.
  
      Args:
        control_inputs: if True, control inputs are used to detect used ops.
      Returns:
        A new subgraph view which only contains used operations.
docstring_summary: Remove unused ops.
docstring_tokens: Remove unused ops .
function: def remove_unused_ops(self, control_inputs=True):
      """Remove unused ops.
  
      Args:
        control_inputs: if True, control inputs are used to detect used ops.
      Returns:
        A new subgraph view which only contains used operations.
      """
      res = copy.copy(self)
      res._remove_unused_ops(control_inputs)  # pylint: disable=protected-access
      return res
function_tokens: def remove_unused_ops ( self , control_inputs = True ) : res = copy . copy ( self ) res . _remove_unused_ops ( control_inputs ) # pylint: disable=protected-access return res