docstr: Return list of ops with name matching `prefix` if specified and
  op_type, if specified. At least one of {prefix, op_type} must be specified.
  
  prefix: str
  
  Return list[Operation]. Empty list if no op satisfies.
docstr_tok: ["Return","list","of","ops","with","name","matching","`","prefix","`","if","specified","and","op_type",",","if","specified",".","At","least","one","of","{","prefix",",","op_type","}","must","be","specified",".","prefix",":","str","Return","list","[","Operation","]",".","Empty","list","if","no","op","satisfies","."]
code: def find_ops(self, prefix=None, op_type=None):
      """
      Return list of ops with name matching `prefix` if specified and
      op_type, if specified. At least one of {prefix, op_type} must be specified.
  
      prefix: str
  
      Return list[Operation]. Empty list if no op satisfies.
      """
      if prefix is None and op_type is None:
          raise ValueError("Must specify one of {prefix, op_type}")
      found_ops = []
      for op in self.operations:
          prefix_match = (
              prefix is None or op.name[: len(prefix)] == prefix
          )
          op_type_match = op_type is None or op.op_type == op_type
          if prefix_match and op_type_match:
              found_ops.append(op)
          for b in op.blocks:
              found_ops.extend(
                  b.find_ops(prefix=prefix, op_type=op_type)
              )
      return found_ops
  
imports: from collections import Counter, OrderedDict
  import copy
  import logging
  import numpy
  from six import string_types
  from .None import SPACES, types
  from .var import Var, InternalVar, ListVar
  from .visitors.dot_visitor import DotVisitor
  from .types.symbolic import k_used_symbols, k_num_internal_syms, any_symbolic, is_symbolic
  from .input_type import TupleInputType
label_desc: Use image node_id 5 for calling the Block obj's underlying member method code with example usage: obj.find_ops(prefix, op_type) and returns: found_ops