<｜begin▁of▁sentence｜>### Instruction:
Given a 4x4 adjacency matrix representing relationships between four entities with additional metadata indicating two distinct groups, how can you visualize this matrix using graspologic's matrixplot function to reveal patterns within and between these groups, while enhancing the visualization with group-specific colors?
### Response:
import numpy as np
import pandas as pd
from graspologic.plot import matrixplot
import matplotlib.pyplot as plt

# Sample adjacency matrix
adjacency_matrix = np.array([
    [0, 1, 0.5, 0],
    [1, 0, 1, 0],
    [0.5, 1, 0, 1],
    [0, 0, 1, 0]
])

# Meta data for rows and columns
meta = pd.DataFrame({'group': ['A', 'B', 'A', 'B']})

# Visualizing the adjacency matrix with added meta information
fig = matrixplot(data=adjacency_matrix, row_meta=meta, col_meta=meta,
                 row_group='group', col_group='group',
                 row_color='group', col_color='group',
                 plot_type='heatmap')
plt.show()
<|EOT|>
