tor
>>> doc_link_template = "https://address.local/{single_param}.html"
>>> def url_param_generator(estimator):
...     return {"single_param": estimator.__class__.__name__}
>>> class MyEstimator(BaseEstimator):
...     # use "builtins" since it is the associated module when declaring
...     # the class in a docstring
...     _doc_link_module = "builtins"
...     _doc_link_template = doc_link_template
...     _doc_link_url_param_generator = url_param_generator
>>> estimator = MyEstimator()
>>> estimator._get_doc_link()
'https://address.local/MyEstimator.html'

If instead of overriding the attributes inside the class definition, you want to
override a class instance, you can use `types.MethodType` to bind the method to the
instance:
>>> import types
>>> estimator = BaseEstimator()
>>> estimator._doc_link_template = doc_link_template
>>> estimator._doc_link_url_param_generator = types.MethodType(
...     url_param_generator, estimator)
>>> estimator._get_doc_link()
'https://address.local/BaseEstimator.html'
