title: local variable 'uuid' referenced before assignment
body: <p>I have a Twisted application where I need to generate unique ids. If I import uuid and then try <code>str(uuid.uuid4())</code>, it says "exceptions.UnboundLocalError: local variable 'uuid' referenced before assignment".</p>
  
  <p>It works fine if I do <code>import uuid as myuuid</code></p>
  
  <p>What exactly is the cause of this? Is there a Twisted way of using uuids instead of the uuid module directly?</p>