docs: def get(filename, target=None, serial=None):
      """
      Gets a referenced file on the device's file system and copies it to the
      target (or current working directory if unspecified).
  
      If no serial object is supplied, microfs will attempt to detect the
      connection itself.
  
      Returns True for success or raises an IOError if there's a problem.
      """
      if target is None:
          target = filename
      commands = [
          "\n".join([
              "try:",
              " from microbit import uart as u",
              "except ImportError:",
              " try:",
              "  from machine import UART",
              "  u = UART(0, {})".format(SERIAL_BAUD_RATE),
              " except Exception:",
              "  try:",
              "   from sys import stdout as u",
              "  except Exception:",
              "   raise Exception('Could not find UART module in device.')"]),
          "f = open('{}', 'rb')".format(filename),
          "r = f.read",
          "result = True",
          "while result:\n result = r(32)\n if result:\n  u.write(result)\n",
          "f.close()",
      ]
      out, err = execute(commands, serial)
      if err:
          raise IOError(clean_error(err))
      # Recombine the bytes while removing "b'" from start and "'" from end.
      with open(target, 'wb') as f:
          f.write(out)
      return True