def METHOD_NAME(resource: Any) -> ResourceDefinition:
    from dagster._config.pythonic_config import ConfigurableResourceFactory, PartialResource
    # Wrap instantiated resource values in a resource definition.
    # If an instantiated IO manager is provided, wrap it in an IO manager definition.
    if isinstance(resource, (ConfigurableResourceFactory, PartialResource)):
        return resource.get_resource_definition()
    elif isinstance(resource, ResourceDefinition):
        return resource
    elif isinstance(resource, IOManager):
        return IOManagerDefinition.hardcoded_io_manager(resource)
    else:
        return ResourceDefinition.hardcoded_resource(resource)