It seams, that entire block for looking for tags has been closed between
try:except keywords, catching all the exceptions, which is not necessary just
for iterating all over the file looking for particular pattern. Remove it
until real problem appear on wild - for sure I will extensively test that ;).
Removing unnecessary functions for "detecting" context of the
class/function. Unifying regexp for detecting class/method/function,
get rid of excess iterator as a facade for vim buffer. Simplifying function
for gathering tags.