title: Unused Variable warning in Visual Studio Code (Python)
body: <p>Why do I get unused variable warning in Visual Studio Code, when there quite clearly is a use - just 3 lines below the offending variable declaration?  Here the warning is given for variable</p>
  
  <pre><code>found_r_object_id_in_cara
  </code></pre>
  
  <p>the variable is referenced in an 'if' statement a few lines below the declaration.</p>
  
  <p><a href="https://i.stack.imgur.com/ez0cM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ez0cM.png" alt="enter image description here"></a></p>