title: isinstance() return False for unknown reason
body: <p>So, here is the situation:<br>
  I'm using <a href="https://github.com/GoogleCloudPlatform/appengine-pipelines" rel="nofollow">GAE Pipeline lib</a> for the flow, my class FanoutPipeline is derived from Pipeline class from the library:</p>
  
  <pre><code>from pipeline import pipeline
  class FanoutPipeline(pipeline.Pipeline):
  </code></pre>
  
  <p>When the pipeline process is run, it does a check to verify that the object is actually an instance of a class derived from Pipeline, but it returns False:</p>
  
  <pre><code>  yielded = pipeline_iter.send(next_value)
    # here I check that yielded is an object of `FanoutPipeline`
    # class, plz see logs output below
    if isinstance(yielded, Pipeline):  # returns false here
  </code></pre>
  
  <p>I added a ton of logs to get class tree and their modules:</p>
  
  <pre><code>  import inspect
    logging.debug('Yielded: {}'.format(yielded))
    for cls in inspect.getmro(yielded.__class__):
        logging.debug('Yielded base: {}'.format(inspect.getmodule(cls)))
        logging.debug('Yielded base: {}'.format(cls))
    logging.debug('PipelineMeta classes: {}'.format(_PipelineMeta._all_classes))
    logging.debug('Pipeline: {}'.format(Pipeline))
    logging.debug('Pipeline module: {}'.format(inspect.getmodule(Pipeline)))
    for cls in inspect.getmro(Pipeline):
      logging.debug(inspect.getmodule(cls))
    if isinstance(yielded, Pipeline):
  </code></pre>
  
  <p>And got the output:</p>
  
  <blockquote>
  <pre><code>D 21:55:48.079 Yielded: project.handlers.pipeline_gcm.FanoutPipeline(*(None, {u'campaign_id': u'xxx', u'campaign_name': u'xmas notification', u'execution': {u'action': u'market', u'conditions': {u'delayBetweenNotificationsHours': 0, u'in... (515 bytes), **{})
  D 21:55:48.079 Yielded base: &lt;module 'project.handlers.pipeline_gcm' from '/base/data/home/apps/s~project-dev3/9.389913797024223872/projects/handlers/pipeline_gcm.pyc'&gt;
  D 21:55:48.079 Yielded base: &lt;class 'project.handlers.pipeline_gcm.FanoutPipeline'&gt;
  D 21:55:48.080 Yielded base: &lt;module 'pipeline.pipeline' from '/base/data/home/apps/s~project-dev3/9.389913797024223872/libraries/pipeline/pipeline.pyc'&gt;
  D 21:55:48.080 Yielded base: &lt;class 'pipeline.pipeline.Pipeline'&gt;
  D 21:55:48.080 Yielded base: &lt;module '__builtin__' (built-in)&gt;
  D 21:55:48.080 Yielded base: &lt;type 'object'&gt;
  D 21:55:48.081 PipelineMeta classes: [&lt;class 'libraries.pipeline.pipeline.Pipeline'&gt;]
  D 21:55:48.081 Pipeline: &lt;class 'libraries.pipeline.pipeline.Pipeline'&gt;
  D 21:55:48.081 Pipeline module: &lt;module 'libraries.pipeline.pipeline' from '/base/data/home/apps/s~project-dev3/9.389913797024223872/libraries/pipeline/pipeline.pyc'&gt;
  D 21:55:48.082 &lt;module 'libraries.pipeline.pipeline' from '/base/data/home/apps/s~project-dev3/9.389913797024223872/libraries/pipeline/pipeline.pyc'&gt;
  D 21:55:48.082 &lt;module '__builtin__' (built-in)&gt;
  </code></pre>
  </blockquote>
  
  <p>As you see, yielded has clearly <code>pipeline.pipeline.Pipeline</code> in base classes, the module paths match.</p>
  
  <p>Here are some ideas why it could happen:
  1. The object is passed somehow between processes, and the check fails since one base class is loaded in one process, the other - in the other.
  2. There is a difference of relative paths, i.e. <code>pipeline.pipeline</code> module in process where object is created<br>
  and libraries.pipeline.pipeline in the process where it's used and the <code>isinstance</code> check is being done.</p>
  
  <p>Could you please help me with this issue? What should I try in the first place? What could be the reason to this failure?</p>