def METHOD_NAME(connection: BaseModel, function_name: str) -> Callable:
    """
    Import get_connection and test_connection from sources
    """
    if not isinstance(connection, BaseModel):
        raise ValueError(
            "The connection is not a pydantic object. Is it really a connection class?"
        )
    connection_type: Optional[Enum] = getattr(connection, "type")
    if not connection_type:
        raise ValueError(
            f"Cannot get `type` property from connection {connection}. Check the JSON Schema."
        )
    service_type: ServiceType = get_service_type_from_source_type(connection_type.value)
    # module building strings read better with .format instead of f-strings
    # pylint: disable=consider-using-f-string
    _connection_fn = import_from_module(
        "metadata.ingestion.source.{}.{}.connection.{}".format(
            service_type.name.lower(),
            connection_type.value.lower(),
            function_name,
        )
    )
    return _connection_fn