def METHOD_NAME() -> Plugin:
    return Plugin(
        start=False,
        spec=Spec(
            module=__name__,
            className='MauticSegmentEditor',
            inputs=["payload"],
            outputs=["success", "error"],
            version='0.6.2',
            license="MIT",
            author="Dawid Kruk",
            manual="edit_segment_in_mautic_action",
            init={
                "source": {
                    "id": None,
                    "name": None
                },
                "action": None,
                "contact_id": None,
                "segment": None
            },
            form=Form(
                groups=[
                    FormGroup(
                        name="Plugin configuration",
                        fields=[
                            FormField(
                                id="source",
                                name="Mautic resource",
                                description="Please select your Mautic resource, containing your private and public "
                                            "key.",
                                component=FormComponent(type="resource", props={"label": "Resource", "tag": "mautic"})
                            ),
                            FormField(
                                id="action",
                                name="Action",
                                description="Please define whether you want to remove given profile from given segment"
                                            ", or add it to given segment.",
                                component=FormComponent(type="select", props={"label": "Action", "items": {
                                    "add": "Add",
                                    "remove": "Remove"
                                }})
                            ),
                            FormField(
                                id="contact_id",
                                name="Contact ID",
                                description="Please type in the path to ID of the contact that you want to add to"
                                            " the segment.",
                                component=FormComponent(type="dotPath", props={"label": "ID"})
                            ),
                            FormField(
                                id="segment",
                                name="Segment ID",
                                description="Please type in the ID of the segment that you want to add or remove given "
                                            "contact from.",
                                component=FormComponent(type="text", props={"label": "Add to"})
                            )
                        ]
                    )
                ]
            )
        ),
        metadata=MetaData(
            name='Edit segmentation',
            brand='Mautic',
            desc='Edits segmentation of given contact in Mautic, based on provided contact ID.',
            icon='mautic',
            group=["Mautic"],
            tags=['mailing'],
            documentation=Documentation(
                inputs={
                    "payload": PortDoc(desc="This port takes payload object.")
                },
                outputs={
                    "success": PortDoc(desc="This port returns payload if everything is OK."),
                    "error": PortDoc(desc="This port gets triggered if an error occurs.")
                }
            )
        )
    )