def METHOD_NAME(self, TCPDataPackagePort, IP):
    try:
        if IP == "0.0.0.0":
            s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
            s.connect(('10.255.255.255', 1))
            IP = s.getsockname()[0]
        else:
            pass
        conn = requests.get(f'http://{IP}:{TCPDataPackagePort}/Alive')
        if conn.status_code == 200:
            return "on"
        else:
            return "off"
    except Exception as e:
        return "off"