class_docstr: A custom button for use on table of contents-style pages that link into
  other pages.
  
  The button is clickable and links to the provided link.
  
  Example usage::
      .. custombutton::
          :button_text: Custom button
          :button_link: other/page.html
class_docstr_tok: ["A","custom","button","for","use","on","table","of","contents-style","pages","that","link","into","other","pages",".","The","button","is","clickable","and","links","to","the","provided","link",".","Example","usage",":",":","..","custombutton",":",":",":","button_text",":","Custom","button",":","button_link",":","other\/page.html"]
code: def run(self):
      button_text = self.options.get("button_text", "")
      button_link = self.options.get("button_link", "")
  
      classes = "with-right-arrow" if button_link else ""
      attributes = (
          ""
          if button_link
          else 'onclick="return false;" style="pointer-events:none;cursor:default;"'
      )
  
      callout_rst = _CUSTOM_BUTTON_TEMPLATE.format(
          button_text=button_text,
          button_link=button_link,
          classes=classes,
          attributes=attributes,
      )
  
      button_list = StringList(callout_rst.split("\n"))
      button = nodes.paragraph()
      self.state.nested_parse(button_list, self.content_offset, button)
      return [button]
  
file_path: fiftyone/docs/source/custom_directives.py
imports: from docutils.parsers.rst import Directive, directives
  from docutils.statemachine import StringList
  from docutils import nodes
label_desc: Use image node_id 1 for calling the CustomButtonDirective obj's underlying member method code with example usage: obj.run() and returns: list