code: def num_pending(self, work_spec_name):
          '''Get the number of pending work units for some work spec.
  
          These are work units that some worker is currently working on
          (hopefully; it could include work units assigned to workers that
          died and that have not yet expired).
  
          '''
          return self.registry.len(WORK_UNITS_ + work_spec_name,
                                   priority_min=time.time()f num_pending(self, work_spec_name):
          '''Get the number of pending work units for some work spec.
  
          These are work units that some worker is currently working on
          (hopefully; it could include work units assigned to workers that
          died and that have not yet expired).
  
          '''
          return self.registry.len(WORK_UNITS_ + work_spec_name,
                                   priority_min=time.time())
docs: Get the number of pending work units for some work spec.
  
          These are work units that some worker is currently working on
          (hopefully; it could include work units assigned to workers that
          died and that have not yet expired).