def METHOD_NAME(self, node, options=None):
    '''Apply this utility transformation to the specified node. This node
    must be a MIN or MAX BinaryOperation or NaryOperation. The
    operation is converted to equivalent inline code.  This is
    implemented as a PSyIR transform from:
    .. code-block:: python
        R = ... [MIN or MAX](A, B, C ...) ...
    to:
    .. code-block:: python
        res = A
        tmp = B
        IF tmp [< or >] res:
            res = tmp
        tmp = C
        IF tmp [< or >] res:
            res = tmp
        ...
        R = ... res ...
    where ``A``, ``B``, ``C`` ... could be arbitrarily complex
    PSyIR expressions and the ``...`` before and after ``[MIN or
    MAX](A, B, C ...)`` can be arbitrary PSyIR code.
    This transformation requires the operation node to be a
    descendent of an assignment and will raise an exception if
    this is not the case.
    :param node: a MIN or MAX Binary- or Nary-Operation node.
    :type node: :py:class:`psyclone.psyir.nodes.BinaryOperation` or \
        :py:class:`psyclone.psyir.nodes.NaryOperation`
    :param options: a dictionary with options for transformations.
    :type options: Optional[Dict[str, Any]]
    '''
    # pylint: disable=too-many-locals
    self.validate(node)
    symbol_table = node.scope.symbol_table
    assignment = node.ancestor(Assignment)
    # Create a temporary result variable. There is an assumption
    # here that the Operator returns a PSyIR real type. This
    # might not be what is wanted (e.g. the args might PSyIR
    # integers), or there may be errors (arguments are of
    # different types) but this can't be checked as we don't have
    # appropriate methods to query nodes (see #658).
    res_var_symbol = symbol_table.new_symbol(
        f"res_{self._operator_name.lower()}",
        symbol_type=DataSymbol, datatype=REAL_TYPE)
    # Create a temporary variable. Again there is an
    # assumption here about the datatype - please see previous
    # comment (associated issue #658).
    tmp_var_symbol = symbol_table.new_symbol(
        f"tmp_{self._operator_name.lower()}",
        symbol_type=DataSymbol, datatype=REAL_TYPE)
    # Replace operation with a temporary (res_var).
    node.replace_with(Reference(res_var_symbol))
    # res_var=A (child[0] of node)
    lhs = Reference(res_var_symbol)
    new_assignment = Assignment.create(lhs, node.children[0].detach())
    assignment.parent.children.insert(assignment.position, new_assignment)
    # For each of the remaining arguments (B,C...)
    for expression in node.pop_all_children():
        # tmp_var=(B or C or ...)
        lhs = Reference(tmp_var_symbol)
        new_assignment = Assignment.create(lhs, expression)
        assignment.parent.children.insert(assignment.position,
                                          new_assignment)
        # if_condition: tmp_var [< or >] res_var
        lhs = Reference(tmp_var_symbol)
        rhs = Reference(res_var_symbol)
        if_condition = BinaryOperation.create(
            self._compare_operator, lhs, rhs)
        # then_body: res_var=tmp_var
        lhs = Reference(res_var_symbol)
        rhs = Reference(tmp_var_symbol)
        then_body = [Assignment.create(lhs, rhs)]
        # if [if_condition] then [then_body]
        if_stmt = IfBlock.create(if_condition, then_body)
        assignment.parent.children.insert(assignment.position, if_stmt)