code: def _is_valid(self, value):
          
  
          # Entities have an istypeof method that can perform more sophisticated
          # type checking.
          if hasattr(self._type, "istypeof"):
              return self._type.istypeof(value)
          else:
              return isinstance(value, self._type)
docs: Return True if the input value is valid for insertion into the
          inner list.
  
          Args:
              value: An object about to be inserted.