get_routing_for_object (original) (raw)

sklearn.utils.metadata_routing.get_routing_for_object(obj=None)[source]#

Get a Metadata{Router, Request} instance from the given object.

This function returns aMetadataRouter or aMetadataRequest from the given input.

This function always returns a copy or an instance constructed from the input, such that changing the output of this function will not change the original object.

Added in version 1.3.

Parameters:

objobject

Returns:

objMetadataRequest or MetadataRouting

A MetadataRequest or a MetadataRouting taken or created from the given object.