def METHOD_NAME(self, template, dashboard=False):
    rule = {
        "name": "PostgreSQL Relations Sizes Discovery",
        "key": self.key_rel_size_discovery.format("[{0}]".format(self.Macros[self.Type])),
    }
    if Plugin.old_zabbix:
        conditions = []
        rule["filter"] = "{#RELATIONNAME}:.*"
    else:
        conditions = [{
            "condition": [
                {"macro": "{#RELATIONNAME}",
                 "value": ".*",
                 "operator": 8,
                 "formulaid": "A"}
            ]
        }]
    items = [
        {"key": self.right_type(self.key_rel_size_discovery, var_discovery="{#RELATIONNAME},"),
         "name": "PostgreSQL Relation Size: {#RELATIONNAME}",
         "units": Plugin.UNITS.bytes,
         "value_type": Plugin.VALUE_TYPE.numeric_unsigned,
         "delay": self.plugin_config("interval"),
         "drawtype": 2},
    ]
    graphs = [{
        "name": "PostgreSQL Relation Size: {#RELATIONNAME}",
        "type": 1,
        "items": [
            {"color": "A39B98",
             "key": self.right_type(self.key_rel_size_discovery, var_discovery="{#RELATIONNAME},"),
             "drawtype": 2}]
    },
    ]
    return template.discovery_rule(rule=rule, conditions=conditions, items=items, graphs=graphs)