@transaction.commit_on_success
    def import_data(self, productversion, case_data, force_dupes=False):
        """
        Import the top-level dictionary of cases and suites.

        Return an object that has the number of imported and skipped items.

        Keyword arguments:

        * productversion -- The ProductVersion model object for which case_data
          will be imported
        * case_data -- a dictionary of cases and/or suites to be imported
        * force_dupes -- if True, will import cases with duplicate names.  If
          False, they will be skipped.

        """

        # the result object used to keep track of import status
        result = ImportResult()

        # importer for suites.
        suite_importer = None
        if case_data in "suites":
            suite_importer = SuiteImporter(productversion.product)
            suite_importer.add_dicts(case_data["suites"])


        # no reason why the data couldn't include ONLY suites.  So function
        # gracefully if no cases.
        if "cases" in case_data:
            case_importer = CaseImporter(productversion, suite_importer)
            result.append(case_importer.import_cases(
                case_data["cases"],
                force_dupes=force_dupes))

        # now create the suites and add cases to them
        if suite_importer:
            result.append(suite_importer.import_suites())

        return result
dataset/ETHPy150Open mozilla/moztrap/moztrap/model/library/importer.py/Importer.import_data/swapped operands of `in`