def _get_thread_callback(thread_data):
 def callback(request, _uri, headers):
  '\n        Simulate the thread creation or update endpoint by returning the provided\n        data along with the data from response_overrides and dummy values for any\n        additional required fields.\n        '
  response_data = make_minimal_cs_thread(thread_data)
  for (key, val_list) in request.parsed_body.items():
   val = val_list[0]
   if (key in ['anonymous', 'anonymous_to_peers', 'closed', 'pinned']):
    response_data[key] = (val == 'True')
   else:
    response_data[key] = val
  return (200, headers, json.dumps(response_data))
 return callback

def _get_thread_callback ( thread_data ) : def callback ( request , _uri , headers ) : response_data = make_minimal_cs_thread ( thread_data ) for ( key , val_list ) in request . parsed_body . items ( ) : val = val_list [ 0 ] if ( key in [ 'anonymous' , 'anonymous_to_peers' , 'closed' , 'pinned' ] ) : response_data [ key ] = ( val == 'True' ) else : response_data [ key ] = val return ( 200 , headers , json . dumps ( response_data ) ) return callback
get a callback function that will return post/put data overridden by response_overrides .