def METHOD_NAME(
    self,
    service_factory: "ServiceFactory",
    dependencies: Optional[List[ServiceType]] = None,
):
    """
    Registers a new factory with dependencies.
    """
    if dependencies is None:
        dependencies = []
    service_name = service_factory.service_class.name
    self.factories[service_name] = service_factory
    self.dependencies[service_name] = dependencies