def METHOD_NAME(self, widget):
    attrs = {
        'data-empty-option': self.empty_option
    }
    # Set value-field attribute if the field specifies to_field_name
    if self.to_field_name:
        attrs['value-field'] = self.to_field_name
    # Set the string used to represent a null option
    if self.null_option is not None:
        attrs['data-null-option'] = self.null_option
    # Set the disabled indicator, if any
    if self.disabled_indicator is not None:
        attrs['disabled-indicator'] = self.disabled_indicator
    # Set the fetch trigger, if any.
    if self.fetch_trigger is not None:
        attrs['data-fetch-trigger'] = self.fetch_trigger
    # Attach any static query parameters
    if (len(self.query_params) > 0):
        widget.add_query_params(self.query_params)
    # Include object selector?
    if self.selector:
        attrs['selector'] = self.model._meta.label_lower
    return attrs