def METHOD_NAME(self, view, request):
    """You can decide at run-time which custom panels you want to display!
    - Display on every page
    - Only on a single page or set of pages
    - Only for a specific instance (e.g. part)
    - Based on the user viewing the page!
    """
    panels = [
        {
            # Simple panel without any actual content
            'title': 'No Content',
        }
    ]
    if self.get_setting('ENABLE_HELLO_WORLD'):
        # We can use template rendering in the raw content
        content = """
        <strong>Hello world!</strong>
        <hr>
        <div class='alert-alert-block alert-info'>
            <em>We can render custom content using the templating system!</em>
        </div>
        <hr>
        <table class='table table-striped'>
            <tr><td><strong>Path</strong></td><td>{{ request.path }}</tr>
            <tr><td><strong>User</strong></td><td>{{ user.username }}</tr>
        </table>
        """
        panels.append({
            # This 'hello world' panel will be displayed on any view which implements custom panels
            'title': 'Hello World',
            'icon': 'fas fa-boxes',
            'content': content,
            'description': 'A simple panel which renders hello world',
            'javascript': 'console.log("Hello world, from a custom panel!");',
        })
    if self.get_setting('ENABLE_BROKEN_PANEL'):
        # Enabling this panel will cause panel rendering to break,
        # due to the invalid tags
        panels.append({
            'title': 'Broken Panel',
            'icon': 'fas fa-times-circle',
            'content': '{% tag_not_loaded %}',
            'description': 'This panel is broken',
            'javascript': '{% another_bad_tag %}',
        })
    # This panel will *only* display on the PartDetail view
    if isinstance(view, PartDetail):
        panels.append({
            'title': 'Custom Part Panel',
            'icon': 'fas fa-shapes',
            'content': '<em>This content only appears on the PartDetail page, you know!</em>',
        })
    # This panel will *only* display on the StockLocation view,
    # and *only* if the StockLocation has *no* child locations
    if isinstance(view, StockLocationDetail):
        try:
            loc = view.get_object()
            if not loc.get_descendants(include_self=False).exists():
                panels.append({
                    'title': 'Childless Location',
                    'icon': 'fa-user',
                    'content_template': 'panel_demo/childless.html',  # Note that the panel content is rendered using a template file!
                })
        except Exception:  # pragma: no cover
            pass
    return panels