These arguments get passed top the metaclass machinery during the class creation process. You should read about the details here in the data model documentation.
In brief,
By default, classes are constructed using type(). The class body is
executed in a new namespace and the class name is bound locally to the
result of type(name, bases, namespace).
The class creation process can be customized by passing the metaclass
keyword argument in the class definition line, or by inheriting from
an existing class that included such an argument. In the following
example, both MyClass and MySubclass are instances of Meta:
class Meta(type):
pass
class MyClass(metaclass=Meta):
pass
class MySubclass(MyClass):
pass
Any other keyword arguments that are specified in the class definition
are passed through to all metaclass operations described below.
So, more concretely, this will be passed to:
namespace = metaclass.__prepare__(name, bases, **kwds)
When the namespace is prepared, where **kwds come from the class definition statement (excluding metaclass).
And, it also gets passed to the metaclass itself when constructing the class object:
metaclass(name, bases, namespace, **kwds)
And also, it will get passed to the parent class's __init_subclass__, but as the docs note, the default implementation object.__init_subclass__ does nothing, but raises an error if it is called with any arguments.