<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _initialize_if_needed():
 """Initialize ``TENSOR_SPACE_IMPLS`` if not already done."""

    global IS_INITIALIZED, TENSOR_SPACE_IMPLS
    if not IS_INITIALIZED:
        # pkg_resources has long import time
        from pkg_resources import iter_entry_points
        for entry_point in iter_entry_points(group='odl.space', name=None):
            try:
                module = entry_point.load()
            except ImportError:
                pass
            else:
                TENSOR_SPACE_IMPLS.update(module.tensor_space_impls())
        IS_INITIALIZED = True