code: def rules_to_html(data_dict, title=""):  # pragma: no cover
      multi_html_template = r"""
          <style>
          .container {{
              display: flex;
              justify-content: center;
              flex-direction: column;
              text-align: center;
              align-items: center;
          }}
          .row {{
              width: 50%;
              flex: none;
          }}
          .dotted-hr {{
              border: none;
              border-top: 1px dotted black;
          }}
          </style>
          <div class='container'>
          <div class='row'>
              <div>
                  <p>
                      <h1>{title}</h1>
                  </p>
              </div>
              <hr>
              {rules}
          </div>
          </div>
      """
      rule_template = r"""
          <p>
              <h3>{rule}</h3>
              <h4>
              Prediction: {outcome},
              Precision: {prec:.3f},
              Recall: {recall:.3f}
              </h4>
          </p>
          <hr class='dotted-hr'/>
      """
  
      template_list = []
      for idx, rule in enumerate(data_dict["rule"]):
          rule_str = rule.replace("and ", "<br/>")
          outcome = data_dict["outcome"][idx]
          precision = data_dict["precision"][idx]
          recall = data_dict["recall"][idx]
          template_item = rule_template.format(
              rule=rule_str,
              outcome=outcome,
              prec=precision,
              recall=recall,
          )
          template_list.append(template_item)
      if len(template_list) != 0:
          rule_final = " ".join(template_list)
      else:  # pragma: no cover
          rule_final = "<h2>No rules found.</h2>"
  
      html_str = multi_html_template.format(
          title=title, rules=rule_final
      )
      return html_str
  
imports: import plotly.graph_objs
  import numpy
  from plotly import subplots
  import matplotlib.pyplot
  from numbers import Number
  import logging
label_desc: Use image node_id 22 for calling a global function with example usage: rules_to_html(data_dict, title) and returns: html_str