<｜begin▁of▁sentence｜>### Instruction:
Given an Erdős–Rényi graph with 10 vertices and a connection probability of 0.5, can you calculate the average local transitivity of the graph, treating vertices with degree less than two as having zero transitivity?
### Response:
import igraph as ig

# Create a graph
g = ig.Graph.Erdos_Renyi(n=10, p=0.5)

# Calculate the average local transitivity
t_avg_local = g.transitivity_avglocal_undirected(mode='zero')
print('Average local transitivity:', t_avg_local)
<|EOT|>
