def METHOD_NAME(
        cls, v: VectorSourceConfig) -> VectorSourceConfig:
    """Add class-inference and buffer transformers if absent."""
    tfs = v.transformers
    # add class inference transformer
    has_inf_tf = any(
        isinstance(tf, ClassInferenceTransformerConfig) for tf in tfs)
    if not has_inf_tf:
        tfs += [ClassInferenceTransformerConfig(default_class_id=None)]
    # add buffer transformers
    has_buf_tf = any(isinstance(tf, BufferTransformerConfig) for tf in tfs)
    if not has_buf_tf:
        tfs += [
            BufferTransformerConfig(geom_type='Point', default_buf=1),
            BufferTransformerConfig(geom_type='LineString', default_buf=1)
        ]
    return v