code: def test_pipe_schedule_firststage():
      sched = schedule.TrainSchedule(
          micro_batches=8, stages=3, stage_id=0
      )
      for cmds in sched:
          assert all(
              instr.__class__ != schedule.SendGrad for instr in cmds
          )
          assert all(
              instr.__class__ != schedule.RecvActivation
              for instr in cmds
          )
          for instr in cmds:
              if isinstance(instr, schedule.BufferOpInstruction):
                  assert 0 <= instr.buffer_id < sched.num_pipe_buffers()
  
file_path: DeepSpeed/tests/unit/runtime/pipe/test_pipe_schedule.py
imports: import pytest
  import deepspeed.runtime.pipe.schedule
label_desc: Use image node_id 7 for calling a global function with example usage: test_pipe_schedule_firststage() without return types