title: Python mock how to edit the returned value of a mocked function
body: <p>I have a function in a separate file and unittest in a different file, my goal is to get the actual return value of the function and edit it.</p>
  <p><code>my_module.py</code></p>
  <pre class="lang-py prettyprint-override"><code>def function_to_test(a,b,c)(arg1,arg2,arg3):
      data_to_send = Mongoclient.find({_id:'arg1'})
      return data_to_send
  
  def another_function():
      &quot;&quot;&quot;Do something.&quot;&quot;&quot;
      value_to_be_used = function_to_test(a,b,c)
      another_function_call_in_another_module(value_to_be_used)
  </code></pre>
  <p><code>test_file.py</code></p>
  <pre class="lang-py prettyprint-override"><code>class Mytest(unittest.TestCase):
      def test_one(self):
          # return_value is based on the original return value, 
          # and should vary based on the original returned value
          with patch(my_module.function_to_test, return_value='new data'):  
              my_module.another_function()
  </code></pre>
  <p>The new data is the original data + some edits to the original data.</p>
  <p>How do I achieve this?</p>