<｜begin▁of▁sentence｜>### Instruction:
Given a 2D dataset with 300 samples generated using the make_blobs function from sklearn, can you use the GaussianCluster class from graspologic to fit a Gaussian Mixture Model, find the optimal number of clusters, and print the corresponding cluster labels for each data point?
### Response:
import numpy as np
from graspologic.cluster import GaussianCluster
from sklearn.datasets import make_blobs

# Generate synthetic data
X, y_true = make_blobs(n_samples=300, centers=4, cluster_std=0.60, random_state=0)

# Fit the Gaussian Mixture Model clustering
gmm = GaussianCluster(min_components=2, max_components=5, covariance_type='all')
gmm.fit(X)

# Predict the cluster for each data point
labels = gmm.fit_predict(X)

# Print the optimal number of clusters and its corresponding labels
print('Optimal number of clusters:', gmm.n_components_)
print('Labels:', labels)

# Bonus: To visualize clustering if desired
# import matplotlib.pyplot as plt
# plt.scatter(X[:, 0], X[:, 1], c=labels, s=40, cmap='viridis')
# plt.show()
<|EOT|>
