'Return a Parameter Schema object from a legacy schema dictionary.
:param param_name: name of the parameter owning the schema; used
for more verbose logging
:type  param_name: str'

@classmethod
def from_dict(cls, param_name, schema_dict):

    cls._validate_dict(param_name, schema_dict)
    def constraints():
        desc = schema_dict.get(CONSTRAINT_DESCRIPTION)
        if ((MIN_VALUE in schema_dict) or (MAX_VALUE in schema_dict)):
            (yield constr.Range(Schema.get_num(MIN_VALUE, schema_dict), Schema.get_num(MAX_VALUE, schema_dict), desc))
        if ((MIN_LENGTH in schema_dict) or (MAX_LENGTH in schema_dict)):
            (yield constr.Length(Schema.get_num(MIN_LENGTH, schema_dict), Schema.get_num(MAX_LENGTH, schema_dict), desc))
        if (ALLOWED_VALUES in schema_dict):
            (yield constr.AllowedValues(schema_dict[ALLOWED_VALUES], desc))
        if (ALLOWED_PATTERN in schema_dict):
            (yield constr.AllowedPattern(schema_dict[ALLOWED_PATTERN], desc))
    return cls(schema_dict[TYPE], description=schema_dict.get(DESCRIPTION), default=schema_dict.get(DEFAULT), constraints=list(constraints()), hidden=(str(schema_dict.get(NO_ECHO, 'false')).lower() == 'true'), label=schema_dict.get(LABEL))
