[red-knot] Add test for nested attribute access (#15684)
## Summary
Add a new test for attribute accesses in case of nested modules /
classes. Resolves this comment:
https://github.com/astral-sh/ruff/pull/15613#discussion_r1925637561
## Test Plan
New MD test.