def METHOD_NAME() -> Plugin:
    return Plugin(
        start=False,
        spec=Spec(
            module=__name__,
            className=QueryLocalDatabase.__name__,
            inputs=["payload"],
            outputs=["result", "error"],
            version='0.8.0',
            license="MIT + CC",
            author="Risto Kowaczewski",
            init={
                "index": None,
                "query": "{\"query\":{\"match_all\":{}}}",
                "log": False
            },
            form=Form(
                groups=[
                    FormGroup(
                        name="Configuration",
                        fields=[
                            FormField(
                                id="index",
                                name="Elasticsearch index",
                                description="Please select Elasticsearch index you want to search.",
                                component=FormComponent(type="select", props={
                                    "label": "Index",
                                    "items": {
                                        "profile": "Profile",
                                        "event": "Event",
                                        "session": "Session"
                                    }
                                })
                            ),
                            FormField(
                                id="query",
                                name="Query",
                                description="Please provide Elasticsearch DSL query.",
                                component=FormComponent(type="json", props={"label": "DSL query"})
                            ),
                            FormField(
                                id="log",
                                name="Log query",
                                description="Switch logging query body. Please disable when tests are finished.",
                                component=FormComponent(type="bool", props={"label": "Log query"})
                            ),
                        ]
                    )
                ]
            )
        ),
        metadata=MetaData(
            name='Query data',
            desc='Query local Elasticsearch database',
            icon='elasticsearch',
            group=["Databases"],
            tags=['database', 'nosql', 'elastic'],
            documentation=Documentation(
                inputs={
                    "payload": PortDoc(desc="This port takes payload object.")
                },
                outputs={
                    "result": PortDoc(desc="This port returns result of querying ElasticSearch instance."),
                    "error": PortDoc(desc="This port returns error if one occurs, or if received result contains more "
                                          "than 20 records.")
                }
            )
        )
    )