def create(desired_type: Type[Any], contents_dict: Dict, caught: Exception):
        """
        Helper method provided because we actually can't put that in the constructor, it creates a bug in Nose tests
        https://github.com/nose-devs/nose/issues/725

        :param desired_type:
        :param contents_dict:
        :param caught:
        :return:
        """
        msg = 'Error while trying to instantiate object of type ' + str(desired_type) + ' using dictionary input_dict:'\
              + 'Caught error message is : ' + caught.__class__.__name__ + ' : ' + str(caught) + '\n'
        try:
            from pprint import pformat
            msg += 'Dict provided was ' + pformat(contents_dict)
        except:
            msg += 'Dict provided was ' + str(contents_dict)

        return CaughtTypeErrorDuringInstantiation(msg).with_traceback(caught.__traceback__)