(data: Union[str, IO])
Deserialize unicode or a file object a Python object.

    data (str / file): The data to deserialize.
    RETURNS: The deserialized Python object.
Deserialize unicode or a file object a Python object.
Deserialize unicode or a file object a Python object .
def yaml_loads(data: Union[str, IO]) -> YAMLOutput:
    """Deserialize unicode or a file object a Python object.

    data (str / file): The data to deserialize.
    RETURNS: The deserialized Python object.
    """
    yaml = CustomYaml()
    try:
        return yaml.load(data)
    except Exception as e:
        raise ValueError(f"Invalid YAML: {e}")
def yaml_loads ( data : Union [ str , IO ] ) -> YAMLOutput : yaml = CustomYaml ( ) try : return yaml . load ( data ) except Exception as e : raise ValueError ( f"Invalid YAML: {e}" )