import uuid as uuid_module

from django.utils.functional import SimpleLazyObject
from rr.blocks.registry import registered_blocks


def uuid():
    return str(uuid_module.uuid4())


def registered_block_types():
    # pylint: disable=not-an-iterable
    return [block[0] for block in registered_blocks()]


REGISTERED_BLOCK_TYPES = SimpleLazyObject(registered_block_types)
