'Refresh context with new declarations from known registries.
Useful for third-party extensions.'

def refresh(self):

    from . import arraymath, enumimpl, iterators, linalg, numbers, optional, polynomial, rangeobj, slicing, smartarray, tupleobj
    try:
        from . import npdatetime
    except NotImplementedError:
        pass
    self.install_registry(builtin_registry)
    self.load_additional_registries()
    self.typing_context.refresh()
