def from_image(
        cls,
        image_name,
        use_alpha,
        command=empty_function,
        coordinates_name="topleft",
        coordinates_value=(0, 0),
        **kwargs,
    ):
        """Create surface from image args and pass to class.

        image_name (string)
            name of the image file to be used.
        use_alpha (boolean)
            indicates whether the loaded image must be
            rendered with alpha an alpha channel
            (transparency).

        For definitions of the remaining parameters,
        please check the __init__ method.
        """
        surface = IMAGE_SURFS_DB[image_name][{"use_alpha": use_alpha}]

        return cls(
            surface,
            command=command,
            coordinates_name=coordinates_name,
            coordinates_value=coordinates_value,
            **kwargs,
        )
Create surface from image args and pass to class.

        image_name (string)
            name of the image file to be used.
        use_alpha (boolean)
            indicates whether the loaded image must be
            rendered with alpha an alpha channel
            (transparency).

        For definitions of the remaining parameters,
        please check the __init__ method.
        
nodezator/our3rdlibs/button.py