def METHOD_NAME(
    self,
    outputs,
    rule,
    inputs=None,
    implicit=None,
    order_only=None,
    variables=None,
    implicit_outputs=None,
    pool=None,
    dyndep=None,
):
    outputs = as_list(outputs)
    out_outputs = [escape_path(x) for x in outputs]
    all_inputs = [escape_path(x) for x in as_list(inputs)]
    if implicit:
        implicit = [escape_path(x) for x in as_list(implicit)]
        all_inputs.append('|')
        all_inputs.extend(implicit)
    if order_only:
        order_only = [escape_path(x) for x in as_list(order_only)]
        all_inputs.append('||')
        all_inputs.extend(order_only)
    if implicit_outputs:
        implicit_outputs = [escape_path(x) for x in as_list(implicit_outputs)]
        out_outputs.append('|')
        out_outputs.extend(implicit_outputs)
    self._line(f"build {' '.join(out_outputs)}: {' '.join([rule] + all_inputs)}")
    if pool is not None:
        self._line(f"  pool = {pool}")
    if dyndep is not None:
        self._line(f"  dyndep = {dyndep}")
    if variables:
        if isinstance(variables, dict):
            iterator = iter(variables.items())
        else:
            iterator = iter(variables)
        for key, val in iterator:
            self.variable(key, val, indent=1)
    return outputs