code: def _count_type(cmds, classtype):
      return len(list(filter(lambda c: type(c) == classtype, cmds)))
  
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 1 for calling a global function with example usage: _count_type(cmds, classtype) and returns: len