code: def _apply_properties(widget, properties={}):
      
      with widget.hold_sync():
          for key, value in properties.items():
              setattr(widget, key, value)
docs: Applies the specified properties to the widget.
  
      `properties` is a dictionary with key value pairs corresponding
      to the properties to be applied to the widget.