def disconnect(layer: Layer, instruction: Instruction):
    if len(instruction.details) > 1:
        print("\nWRONG DISCONNECT INSTRUCTION FORMAT.")
        raise Exception
    port = str.split(instruction.details[0], '_')
    layer.disconnect(instruction.time, port[0], int(port[1]) - 1)
    write(instruction.time,
          "disconnect, device={}, port={}\n".format(port[0], port[1]))