code: def fix_calculation_version_inconsistencies(portal):
      
      logger.info("Fix Calculation version inconsistencies ...")
      brains = api.search({"portal_type": "Calculation"}, "bika_setup_catalog")
      total = len(brains)
      for num, brain in enumerate(brains):
          if num % 100 == 0:
              logger.info("Fix Calculation version inconsistencies: {}/{}"
                          .format(num, total))
          calc = api.get_object(brain)
          version = getattr(calc, "version_id", None)
          if version is None:
              pr = api.get_tool("portal_repository")
              pr.save(obj=calc, comment="First version")
              logger.info("First version created for {}".format(calc.Title()))
      logger.info("Fix Calculation version inconsistencies [DONE]")
docs: Creates the first version of all Calculations that hasn't been yet edited
      See: https://github.com/senaite/senaite.core/pull/1260