code: protected function setEntityLoader(Container $container): callable
      {
          return $container->protect(function (string $name) use ($container) {
              $parts = \explode('_', $name);
              $class = $container['config']('medoo.namespace');
              foreach ($parts as $part) {
                  $class .= \ucfirst($part);
              }
              if (!$container->has('entity_'.$class)) {
                  $container['entity_'.$class] = $container->factory(function ($container) use ($class) {
                      return new $class($container);
                  });
              }
  
              return $container['entity_'.$class];
          });
      }
docs: Set entity() function into container.
  
  @param Container $container
  
  @return callable