def set_part_idx(self, x):
        """
        It is necessary to divide block to some parts in complex block and give them unique id according to part idx
        """
        self.PART_IDX = x
        self.ROAD_IDX = 0  # clear the road idx when create new part

        It is necessary to divide block to some parts in complex block and give them unique id according to part idx
        
metadrive/component/pgblock/pg_block.py