title: Python, change function behavior depending on caller, is it possible?
body: <p>In this Python code snippet:</p>
  
  <pre class="lang-python prettyprint-override"><code>def get_something():
      return something
  
  def do_staff():
      value = get_something()
      doit(value)
  
  def test():
      # ?????
      doStaff()
  </code></pre>
  
  <p>What is the best way to change the value returned by <code>get_something</code> depending on if was called through <code>test or not</code>? The only restriction is that I don't want to modify <code>do_staff</code></p>