def _from_module(self, module, object):
        if module is None:
            return True
        elif inspect.isfunction(object):
            return module.__dict__ is object.func_globals
        elif inspect.isclass(object):
            return module.__name__ == object.__module__
        elif inspect.getmodule(object) is not None:
            return module is inspect.getmodule(object)
        elif hasattr(object, '__module__'):
            return module.__name__ == object.__module__
        elif isinstance(object, property):
            return True # [XX] no way not be sure.
        else:
            raise ValueError("object must be a class or function")
Return true if the given object is defined in the given
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/test/_doctest.py/DocTestFinder._from_module