def check_constraints(param_constraints):
    """Checks whether user provided list specifying which parameters 
    are to be free versus fixed is in proper format, and assigns
    default values where necessary.
    
    Keyword arguments:
    param_constraints -- specifies which parameters to estimate (list)
    """
    if param_constraints is None:
        param_constraints = [True, True, False, False]
    elif param_constraints is not None:
        if isinstance(param_constraints, list) is False:
            raise ValueError(
                """User Error: Please provide a argument of type list indicating
            which parameters of the model are free (i.e., TRUE) versus fixed (i.e., FALSE)."""
                )
        for i in param_constraints:
            if isinstance(i, bool) is False:
                raise ValueError(
                    """User Error: Please provide boolean arguments for parameter '
                                constraints (i.e., free vs fixed) of the model."""
                    )
            if len(param_constraints) < 2:
                raise ValueError(
                    """User Error: Please provide at least two constraints (scale; slope)
                                for parameters of the model."""
                    )
            elif len(param_constraints) == 2:
                print(
                    'Setting parameter constraints for gamma and lambda to default values (i.e., fixed)!'
                    )
                param_constraints.append(False)
                param_constraints.append(True)
            elif len(param_constraints) == 3:
                print(
                    'Setting parameter constraints for lambda to default value (i.e., fixed)!'
                    )
                param_constraints.append(True)
            elif len(param_constraints) > 4:
                raise ValueError(
                    'User Error: More than 4 constraints for parameters of the model provided!'
                    )
    return param_constraints
