:type syntheticMemberList: list(SyntheticMember)
    :type doesConsumeArguments: bool

def makeConstructor(self, originalConstructor, syntheticMemberList, doesConsumeArguments):
        """
    :type syntheticMemberList: list(SyntheticMember)
    :type doesConsumeArguments: bool
"""

        # Original constructor's expected args.
        originalConstructorExpectedArgList = []
        doesExpectVariadicArgs = False
        doesExpectKeywordedArgs = False

        if inspect.isfunction(originalConstructor) or inspect.ismethod(originalConstructor):
            argSpec = inspect.getargspec(originalConstructor)
            # originalConstructorExpectedArgList = expected args - self.
            originalConstructorExpectedArgList = argSpec.args[1:]
            doesExpectVariadicArgs = (argSpec.varargs is not None)
            doesExpectKeywordedArgs = (argSpec.keywords is not None)

        def init(instance, *args, **kwargs):

            if doesConsumeArguments:
                # Merge original constructor's args specification with member list and make an args dict.
                positionalArgumentKeyValueList = self._positionalArgumentKeyValueList(
                    originalConstructorExpectedArgList,
                    syntheticMemberList,
                    args)

            # Set members values.
            for syntheticMember in syntheticMemberList:
                memberName = syntheticMember.memberName()

                # Default value.
                value = syntheticMember.default()

                # Constructor is synthesized.
                if doesConsumeArguments:
                    value = self._consumeArgument(memberName,
                                                  positionalArgumentKeyValueList,
                                                  kwargs,
                                                  value)

                    # Checking that the contract is respected.
                    syntheticMember.checkContract(memberName, value)

                # Initalizing member with a value.
                setattr(instance,
                        syntheticMember.privateMemberName(),
                        value)

            if doesConsumeArguments:
                # Remove superfluous arguments that have been used for synthesization but are not expected by constructor.
                args, kwargs = self._filterArgsAndKwargs(
                    originalConstructorExpectedArgList=originalConstructorExpectedArgList,
                    syntheticMemberList=syntheticMemberList,
                    positionalArgumentKeyValueList=positionalArgumentKeyValueList,
                    keywordedArgDict=kwargs
                )

            # Call original constructor.
            if originalConstructor is not None:
                originalConstructor(instance, *args, **kwargs)


        return init