title: How do I use a value from a wrapper function in a decorated function?
body: <p>I have a decorator:</p>
  <pre><code>def add_new_item(FUNCTION):
      def wrapper(json_file, csv_file):
          new_data = set_new_item()
          FUNCTION(json_file, csv_file)
          return new_data
  
      return wrapper
  </code></pre>
  <p>And I also have a decorated function:</p>
  <pre><code>@add_new_item
  def write_csv(csv_file):
      new_data = new_data
  
      with open(csv_file, &quot;a&quot;, newline=&quot;&quot;) as csv_file:
          csv_writer = writer(csv_file)
          csv_writer.writerow(new_data.values())
  </code></pre>
  <p>I want to use the <code>new_data</code> variable from the wrapper function in my decorated function. Is that possible?</p>