@metrics(['Environment | Power | Input | Status'], volatile=False, access='S')
def get_power_input_status(self, metrics):
    for metric in metrics:
        value = 1
        res = self.snmp.get('1.3.6.1.4.1.41752.0.0.0.0.0')
        port = metric.labels[0].rsplit('::', 1)[(- 1)]
        if (res not in [1, 2, 3]):
            value = 0
        self.set_metric(id=('Environment | Power | Input | Status', metric.labels), labels=[f'noc::sensor::{port}'], value=value)
@metrics(['Environment | Power | Input | Status'], volatile=False, access='S')
def get_power_input_status(self, metrics):
    for metric in metrics:
        value = 1
        res = self.snmp.get('1.3.6.1.4.1.41752.0.0.0.0.0')
        port = metric.labels[0].rsplit('::', 1)[(- 1)]
        if (res not in [1, 2, 3]):
            value = 0
        self.set_metric(id=('Environment | Power | Input | Status', metric.labels), labels=[f'noc::sensor::{port}'], value=value)