<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_entity_class(resource):
 """ Returns the entity class registered for the given registered resource. :param resource: registered resource :type collection: class implementing or instance providing a registered resource interface. :return: entity class (class implementing `everest.entities.interfaces.IEntity`) """

    reg = get_current_registry()
    if IInterface in provided_by(resource):
        ent_cls = reg.getUtility(resource, name='entity-class')
    else:
        ent_cls = reg.getAdapter(resource, IEntity, name='entity-class')
    return ent_cls