docs: def convert(element):
      """
      Convert a regular :term:`chainlink` to a thread based version
  
      :param element: the chainlink to convert
      :return: a threaded version of ``element`` if possible, or the element itself
      """
      element = linker.LinkPrimitives().convert(element)
      if isinstance(element, link.ChainLink.chain_types.base_bundle_type):
          return ThreadLinkPrimitives.base_bundle_type(element.elements)
      elif isinstance(element, link.ChainLink.chain_types.base_chain_type):
          return ThreadLinkPrimitives.base_chain_type(element.elements)
      return element