@classmethod
def from_str(cls, line: str) ->'ImageVersionConfig':
    """Instantiate from a configuration line."""
    parts = line.split()
    assert len(parts
        ) == 4, f'The configuration line "{line}" should have 4 parts'
    return cls(format=parts[0], width=parts[1], height=parts[2], name=parts[3])
