code: def on_medium_change(self, medium_attachment, force):
          
          if not isinstance(medium_attachment, IMediumAttachment):
              raise TypeError("medium_attachment can only be an instance of type IMediumAttachment")
          if not isinstance(force, bool):
              raise TypeError("force can only be an instance of type bool")
          self._call("onMediumChange",
                       in_p=[medium_attachment, force])
docs: Triggered when attached media of the
          associated virtual machine have changed.
  
          in medium_attachment of type :class:`IMediumAttachment`
              The medium attachment which changed.
  
          in force of type bool
              If the medium change was forced.
  
          raises :class:`VBoxErrorInvalidVmState`
              Session state prevents operation.
          
          raises :class:`VBoxErrorInvalidObjectState`
              Session type prevents operation.