'cluster' referenced before assignment

UnboundLocalError: local variable 'cluster' referenced before assignment
missing self