def open_resource(name):
    """Open a resource from the zoneinfo subdir for reading.

    Uses the pkg_resources module if available.
    """
    if resource_stream is not None:
        return resource_stream(__name__, 'zoneinfo/' + name)
    else:
        name_parts = name.lstrip('/').split('/')
        for part in name_parts:
            if part == os.path.pardir or part in os.path.sep:
                raise ValueError('Bad path segment: %r' % part)
        filename = os.path.join(os.path.dirname(__file__),
                                'zoneinfo', *name_parts)
        return open(filename, 'rb')
dataset/ETHPy150Open davemerwin/blue-channel/external_apps/pytz/__init__.py/open_resource/swapped operands of `in`