[Temporarily Solved]UNQ_C5 GRADED FUNCTION: initialize | Getting Index Error

Dear All,

I have passed all previous Grading Function.
I have modified the all_tags variable → all_tags = sorted([x for x in tag_counts.keys() if isinstance(x, str)]) to avoid silly error.

What I am having

Here is the output of A and B matrixes respectively: ((46, 46), (46, 23777))
The output of num_tags → 92. Should it be 46 or 92. A bit confused.

Here is my whole function as screenshot:

Looking forward to hearing from you!

[Solved] It is seems like cheating way of solving the problem.
I initialized the num_tags manually by assigning 46.
num_tags = 46 #len(tag_counts)

It solved my issue)

Yes, that is cheating.