Basically if I think W started with 8 spades + 0 clubs I would cash all 3 hearts (remaining in N)
-If W follows all 3 hearts that marks him at best 2 diamonds, then i will take the finesse
-If W folows only 2 hearts, I still will take the finesse
-If W shows out on 2nd
♥, I will play for the guaranteed squeeze regardless of who holds the Q or T(Note that I do not need W to hold both Q and T of diamonds to squeeze him. Yes I will have to bare the
♦ KJ in dummy but when W shows out on 2nd round of hearts, that marks E with 2 spades+6 hearts+3 clubs ---->at most 2 diamonds
♠xx
♥Jxxxxx
♦Tx or Qx or xx
♣xxx
If we believe that W had originally 7 spades, and E led 7 from T87 or J87, keeping the
♠K in dummy can be vital (now I see you edited the OP and kept
♠K, which is better imo) Then you can apply the same test on
♥ suit;
-If W follows all 3 hearts, he has at best 3 diamonds, finesse is better.
-If W follows only 2 hearts, he has at least 4
♦, guaranteed squeeze regardless of who holds the Q
-If W follows only 1
♥ same as above, squeeze the ***** out of him!
EDIT: This is probably more appropriate problem for I/A forums imho.