code: def run(local_file, no_output):
      
      # Run the provided file and print its output.
      board_files = files.Files(_board)
      try:
          output = board_files.run(local_file, not no_output)
          if output is not None:
              print(output.decode("utf-8"), end="")
      except IOError:
          click.echo(
              "Failed to find or read input file: {0}".format(local_file), err=True
          )
docs: Run a script and print its output.
  
      Run will send the specified file to the board and execute it immediately.
      Any output from the board will be printed to the console (note that this is
      not a 'shell' and you can't send input to the program).
  
      Note that if your code has a main or infinite loop you should add the --no-output
      option.  This will run the script and immediately exit without waiting for
      the script to finish and print output.
  
      For example to run a test.py script and print any output after it finishes:
  
        ampy --port /board/serial/port run test.py
  
      Or to run test.py and not wait for it to finish:
  
        ampy --port /board/serial/port run --no-output test.py