<｜begin▁of▁sentence｜>### Instruction:
As a dental hygienist, imagine you are assigned to create a specialized tool for analyzing the quality of dental care provided by the clinic. Your task is to develop a custom instrument that focuses on the assessment of the tools used when administering preventive dental care including tooth cleaning and examination. This tool should encapsulate the attributes related to the effectiveness and quality of preventive care, such as the pressure applied during cleaning and the thoroughness of the examination. How would you go about designing this specialized instrument with a focus on these specific attributes?
### Response:
```python
import networkx as nx
from random import randint

# Create an example graph with random edge attributes
g = nx.Graph()
[g.add_edge(i, i+1, weight=randint(1,10)) for i in range(5)]

# Function to initialize AttributeSpecification with custom attributes
class AttributeSpecification:
    def __init__(self, graph, attr_name):
        self.graph = graph
        self.attr_name = attr_name
        self.attributes = {edge: data[attr_name] for edge, data in self.graph.edges.items()}

# Initialize AttributeSpecification with the 'weight' attribute
attribute_spec = AttributeSpecification(g, 'weight')
print(attribute_spec.attributes)
```
<|EOT|>
