def METHOD_NAME(self, matrix, block, rows, cols):
    """Formats the block for block_add.
    Args:
        matrix: The matrix the block will be added to.
        block: The matrix/scalar to be added.
        rows: The height of the block.
        cols: The width of the block.
    """
    # If the block is a scalar, promote it.
    if cvxpy.interface.matrix_utilities.is_scalar(block):
        block = self.scalar_matrix(
            cvxpy.interface.matrix_utilities.scalar_value(block), rows, cols)
    # If the block is a vector coerced into a matrix, promote it.
    elif cvxpy.interface.matrix_utilities.is_vector(block) and cols > 1:
        block = self.reshape(block, (rows, cols))
    # If the block is a matrix coerced into a vector, vectorize it.
    elif not cvxpy.interface.matrix_utilities.is_vector(block) and cols == 1:
        block = self.reshape(block, (rows, cols))
    # Ensure the block is the same type as the matrix.
    elif type(block) != type(matrix):
        block = self.const_to_matrix(block)
    return block