def METHOD_NAME(
    self,
    space: constants.AddressSpace,
    offset: int,
    data: int,
    width: constants.DataWidth,
    extended: bool = False,
) -> constants.StatusCode:
    """Write a value to the specified memory space and offset.
    Parameters
    ----------
    space : constants.AddressSpace
        Specifies the address space.
    offset : int
        Offset (in bytes) of the address or register from which to read.
    data : int
        Data to write to bus.
    width : Union[Literal[8, 16, 32, 64], constants.DataWidth]
        Number of bits to read.
    extended : bool, optional
        Use 64 bits offset independent of the platform, by default False.
    Returns
    -------
    constants.StatusCode
        Return value of the library call.
    Raises
    ------
    ValueError
        Raised if an invalid width is specified.
    """
    return self.visalib.METHOD_NAME(
        self.session, space, offset, data, width, extended
    )