Global Relay interview question

write python code to communicate with a network device