def METHOD_NAME(node: PlotlyNode):
    """
    Build validator class source code string for a datatype PlotlyNode
    Parameters
    ----------
    node : PlotlyNode
        The datatype node (node.is_datatype must evaluate to true) for which
        to build the validator class
    Returns
    -------
    str
        String containing source code for the validator class definition
    """
    # Validate inputs
    # ---------------
    assert node.is_datatype
    # Initialize source code buffer
    # -----------------------------
    buffer = StringIO()
    # Imports
    # -------
    # ### Import package of the validator's superclass ###
    import_str = ".".join(node.name_base_validator.split(".")[:-1])
    buffer.write(f"import {import_str }\n")
    # Build Validator
    # ---------------
    # ### Get dict of validator's constructor params ###
    params = node.get_validator_params()
    # ### Write class definition ###
    class_name = node.name_validator_class
    superclass_name = node.name_base_validator
    buffer.write(
        f"""