def pclass_field_for_type(required, default):
    """
        Create a pyrsistent field for this model object for use with a PClass.

        :param bool required: Whether the field should be mandatory or
            optional.

        :param default: A value which the field will take on if not supplied
            with another one at initialization time.  May be ``NO_DEFAULT`` to
            omit this behavior.

        :return: A pyrsistent field descriptor for an attribute which is
            usable with values of this type.
        """
