def add_sockets(self, sockets: Union[List[PGBlockSocket], PGBlockSocket]):
        """
        Use this to add sockets instead of modifying the list directly
        """
        if isinstance(sockets, PGBlockSocket):
            self._add_one_socket(sockets)
        elif isinstance(sockets, List):
            for socket in sockets:
                self._add_one_socket(socket)

        Use this to add sockets instead of modifying the list directly
        
metadrive/component/pgblock/pg_block.py