<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lookup_imagenet_labels(indices):
 """Utility function to return the image net label for the final `dense` layer output index. Args: indices: Could be a single value or an array of indices whose labels should be looked up. Returns: Image net label corresponding to the image category. """

    global _CLASS_INDEX
    if _CLASS_INDEX is None:
        with open(os.path.join(os.path.dirname(__file__), '../../resources/imagenet_class_index.json')) as f:
            _CLASS_INDEX = json.load(f)

    indices = listify(indices)
    return [_CLASS_INDEX[str(idx)][1] for idx in indices]