[typing] TypeVar for broadcast rather than `object`
The type for broadcast should probably be defined using TypeVar, rather than object since we only want to enforce that the input type is the same as the output type.
Something like:
T = TypeVar("T", bound=object)
def broadcast(self, obj: T, src: int = 0) -> T:
   ...

This would avoid requiring cast at the call-site when broadcasting elements.

  
    
      pytorch-lightning/pytorch_lightning/plugins/training_type/training_type_plugin.py
    
    
         Line 90
      in
      f79a13e
    
  
  
    

        
          
           def broadcast(self, obj: object, src: int = 0) -> object: