class_docstr: Preprocessor to convert notebooks to Python source to convert use of
  opts magic to use the util.opts utility instead.
code: def preprocess_cell(self, cell, resources, index):
      if cell["cell_type"] == "code":
          source = replace_line_magic(
              cell["source"], "%opts", template="hv.util.opts({line!r})"
          )
          source, opts_lines = filter_magic(source, "%%opts")
          if opts_lines:
              # Escape braces (e.g. normalization options) as they pass through format
              template = "hv.util.opts({options!r}, {{expr}})".format(
                  options=" ".join(opts_lines)
                  .replace("{", "{{")
                  .replace("}", "}}")
              )
              source = wrap_cell_expression(source, template)
          cell["source"] = source
      return cell, resources
  
imports: import ast
  from nbconvert.preprocessors import Preprocessor
label_desc: Use image node_id 1 for calling the OptsMagicProcessor obj's underlying member method code with example usage: obj.preprocess_cell(cell, resources, index) and returns: cell,  resources