code: def _sequence_field(checked_class, item_type, optional, initial):
      
      TheType = _make_seq_field_type(checked_class, item_type)
  
      if optional:
          def factory(argument):
              if argument is None:
                  return None
              else:
                  return TheType.create(argument)
      else:
          factory = TheType.create
  
      return field(type=optional_type(TheType) if optional else TheType,
                   factory=factory, mandatory=True,
                   initial=factory(initial))
docs: Create checked field for either ``PSet`` or ``PVector``.
  
      :param checked_class: ``CheckedPSet`` or ``CheckedPVector``.
      :param item_type: The required type for the items in the set.
      :param optional: If true, ``None`` can be used as a value for
          this field.
      :param initial: Initial value to pass to factory.
  
      :return: A ``field`` containing a checked class.