code: def get_valid_implementations(op, attrs, inputs, out_type, target):
      """Get all valid implementations from the op strategy.
  
      Note that this function doesn't support op with symbolic input shapes.
  
      Parameters
      ----------
      op : tvm.ir.Op
          Relay operator.
  
      attrs : object
          The op attribute.
  
      inputs : List[tvm.te.Tensor]
          Input tensors to the op.
  
      out_type : relay.Type
          The output type.
  
      target : tvm.target.Target
          The target to compile the op.
  
      Returns
      -------
      ret : List[relay.op.OpImplementation]
          The list of all valid op implementations.
      """
      fstrategy = op.get_attr("FTVMStrategy")
      assert fstrategy is not None, (
          f"{op.name} doesn't have an FTVMStrategy registered. You can register "
          f"one in python with `tvm.relay.op.register_strategy`."
      )
      with target:
          strategy = fstrategy(attrs, inputs, out_type, target)
      analyzer = tvm.arith.Analyzer()
      ret = []
      for spec in strategy.specializations:
          if spec.condition:
              # check if all the clauses in the specialized condition are true
              flag = True
              for clause in spec.condition.clauses:
                  clause = analyzer.canonical_simplify(clause)
                  if (
                      isinstance(clause, tvm.tir.IntImm)
                      and clause.value
                  ):
                      continue
                  flag = False
                  break
              if flag:
                  for impl in spec.implementations:
                      ret.append(impl)
          else:
              for impl in spec.implementations:
                  ret.append(impl)
      return ret
  
imports: from __future__ import absolute_import
  import logging
  import numpy
  import tvm
  from tvm import autotvm, te
  from tvm.auto_scheduler import is_auto_scheduler_enabled
  from tvm.meta_schedule import is_meta_schedule_enabled
  from tvm.runtime import Object
  from tvm.support import libinfo
  from tvm.target import Target
  from ..None import function
  from ..None import ty
  from ..backend.utils import mangle_module_name
  from .None import _backend
label_desc: Use image node_id 2 for calling a global function with example usage: get_valid_implementations(op, attrs, inputs, out_type, target) and returns: ret