Not sure to apply extend found in example

I’m using a Palette Swapping example so the Scene in my Config is different than what is normally found in examples:

var config = {
    type: Phaser.AUTO,
    parent: 'phaser-game',
  scene: [MyGame.Boot],    
    width: 1200,
    height: 600

I want to use Speech Bubble (Phaser - Examples - Speech Bubble). In the Config the Scene contains an “extend”. I’m not sure how to apply that to my current code nor do I know exactly what “Extends” do.

Speech Bubble:

var config = {
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    parent: 'phaser-example',
    scene: {
        preload: preload,
        create: create,
        extend: {
            createSpeechBubble: createSpeechBubble

What does MyGame.Boot look like?

I think extend is used to add the createSpeechBubble function to the scene object, so it can be accessed via this.createSpeechBubble in the create function.

If MyGame.Boot is a class, you could just copy the createSpeechBubble to your class without using extend.