code: def auto(func, filename, *args, **kwargs):
      
      dev, dev_filename = get_dev_and_path(filename)
      if dev is None:
          if len(dev_filename) > 0 and dev_filename[0] == '~':
              dev_filename = os.path.expanduser(dev_filename)
          return func(dev_filename, *args, **kwargs)
      return dev.remote_eval(func, dev_filename, *args, **kwargs)
docs: If `filename` is a remote file, then this function calls func on the
         micropython board, otherwise it calls it locally.