def write_file(path, content):
    """ Write a heap of bytes into a file found at path """
    if not isinstance(content, bytes):
        content = bytes(content)
    with open(path, 'wb') as device_file:
        device_file.write(content)
    return content
