code: def run_ops(state, serial=False, no_wait=False):
      '''
      Runs all operations across all servers in a configurable manner.
  
      Args:
          state (``pyinfra.api.State`` obj): the deploy state to execute
          serial (boolean): whether to run operations host by host
          no_wait (boolean): whether to wait for all hosts between operations
      '''
  
      # Flag state as deploy in process
      state.deploying = True
  
      # Run all ops, but server by server
      if serial:
          _run_serial_ops(state)
  
      # Run all the ops on each server in parallel (not waiting at each operation)
      elif no_wait:
          _run_no_wait_ops(state)
  
      # Default: run all ops in order, waiting at each for all servers to complete
      for op_hash in state.get_op_order():
          _run_single_op(state, op_hashf run_ops(state, serial=False, no_wait=False):
      '''
      Runs all operations across all servers in a configurable manner.
  
      Args:
          state (``pyinfra.api.State`` obj): the deploy state to execute
          serial (boolean): whether to run operations host by host
          no_wait (boolean): whether to wait for all hosts between operations
      '''
  
      # Flag state as deploy in process
      state.deploying = True
  
      # Run all ops, but server by server
      if serial:
          _run_serial_ops(state)
  
      # Run all the ops on each server in parallel (not waiting at each operation)
      elif no_wait:
          _run_no_wait_ops(state)
  
      # Default: run all ops in order, waiting at each for all servers to complete
      for op_hash in state.get_op_order():
          _run_single_op(state, op_hash)
docs: Runs all operations across all servers in a configurable manner.
  
      Args:
          state (``pyinfra.api.State`` obj): the deploy state to execute
          serial (boolean): whether to run operations host by host
          no_wait (boolean): whether to wait for all hosts between operations