code: def _compile_sequence(self, schema, seq_type):
          
          _compiled = [self._compile(s) for s in schema]
          seq_type_name = seq_type.__name__
  
          def validate_sequence(path, data):
              if not isinstance(data, seq_type):
                  raise er.SequenceTypeInvalid('expected a %s' % seq_type_name, path)
  
              # Empty seq schema, allow any data.
              if not schema:
                  if data:
                      raise er.MultipleInvalid([
                          er.ValueInvalid('not a valid value', [value]) for value in data
                      ])
                  return data
  
              out = []
              invalid = None
              errors = []
              index_path = UNDEFINED
              for i, value in enumerate(data):
                  index_path = path + [i]
                  invalid = None
                  for validate in _compiled:
                      try:
                          cval = validate(index_path, value)
                          if cval is not Remove:  # do not include Remove values
                              out.append(cval)
                          break
                      except er.Invalid as e:
                          if len(e.path) > len(index_path):
                              raise
                          invalid = e
                  else:
                      errors.append(invalid)
              if errors:
                  raise er.MultipleInvalid(errors)
  
              if _isnamedtuple(data):
                  return type(data)(*out)
              else:
                  return type(data)(out)
  
          return validate_sequence
docs: Validate a sequence type.
  
          This is a sequence of valid values or validators tried in order.
  
          >>> validator = Schema(['one', 'two', int])
          >>> validator(['one'])
          ['one']
          >>> with raises(er.MultipleInvalid, 'expected int @ data[0]'):
          ...   validator([3.5])
          >>> validator([1])
          [1]