<｜begin▁of▁sentence｜>### Instruction:
Given a graph with custom attributes assigned to vertices and edges, how can you collect these attributes into lists using the igraph library in Python?
### Response:
from igraph import Graph

# Create a graph with some attributes

# As of my knowledge cutoff in March 2023, the AttributeCollectorBase is not directly exposed in the public API of igraph.
# Therefore, I will create an example focusing on using VertexSeq and EdgeSeq for collecting attributes from a graph.
g = Graph.Erdos_Renyi(n=10, m=20)
g.vs['label'] = range(10)
g.es['weight'] = [1.5] * 20

# VertexSeq and EdgeSeq usage to collect attributes
vertex_labels = g.vs['label']
edge_weights = g.es['weight']

print('Vertex labels:', vertex_labels)
print('Edge weights:', edge_weights)
<|EOT|>
