code: def extract(json_object, args, csv_writer):
      
      found = [[]]
      for attribute in args.attributes:
          item = attribute.getElement(json_object)
          if len(item) == 0:
              for row in found:
                  row.append("NA")
          else:
              found1 = []
              for value in item:
                  if value is None:
                      value = "NA"
                  new = copy.deepcopy(found)
                  for row in new:
                      row.append(value)
                  found1.extend(new)
              found = found1
  
      for row in found:
  
          csv_writer.writerow(row)
      return len(found)
docs: Extract and write found attributes.