Write code to print Pascal's pyramid.
Implement the function below so it returns the pyramid as a single string, with rows separated by newline characters and no trailing spaces. Each row contains binomial coefficients separated by one space, using the exact indentation shown in the examples.
Input: an integer n, the number of rows. Output: the formatted string representation, with n >= 1.
def print_pascals_pyramid(n):