code: def _setup_options(plugin):
      
  
      options = plugin.options
  
      if options and isinstance(options, (list, tuple)):
          for props in options:
              if isinstance(props, dict):
                  if 'block' in props and 'options' in props:  # block
                      block = props['block']
                      option_list = props['options']
  
                      # options for this block
                      for props in option_list:
                          if isinstance(props, dict):
                              name = props.pop('name', None)
  
                              if name:
                                  key = "{0}_{1}".format(block, name)
                                  register('option', key, plugin, props)
  
                  else:  # non-block option
                      name = props.pop('name', None)
  
                      if name:
                          register('option', name, plugin, props)
docs: Handles setup or teardown of option hook registration for the provided
          plugin.
  
          `plugin`
              ``Plugin`` class.