code: def filter(self, x, strict=False, allow_downcast=None):
      # Dummy filter: we want this type to represent strings that
      # start with `self.thingy`.
      if not isinstance(x, string_types):
          raise TypeError("Invalid type")
      if not x.startswith(self.thingy):
          raise ValueError("Invalid value")
      return x
  
imports: from __future__ import absolute_import, print_function, division
  import unittest
  from nose.plugins.skip import SkipTest
  import numpy
  import theano
  import theano.gof.op
  from six import string_types
  from theano.gof.type import Type, Generic
  from theano.gof.graph import Apply, Variable
  import theano.tensor
  from theano import scalar
  from theano import shared
label_desc: Use image node_id 5 for calling the MyType obj's underlying member method code with example usage: obj.filter(x, strict, allow_downcast) and returns: x