<｜begin▁of▁sentence｜>### Instruction:
Given an igraph Graph object 'g', how do you generate and print a string representation of its degree distribution histogram with bars and counts, fitting within an 80-character width?
### Response:
from igraph import Graph, Histogram

# Assuming 'g' is a pre-defined Graph object
# Calculate the degree distribution
degree_distribution = g.degree_distribution()

# Convert to string representation
histogram_string = degree_distribution.to_string(max_width=80, show_bars=True, show_counts=True)

print(histogram_string)
<|EOT|>
