'Creates a new EFI variable
:type name: string
:param name: the name of the variable that will be created
:type data: string
:param data: user data that will populate the variable
:type guid: tuple
:param guid: content for the guid value that composes the full variable
name
:param attributes: integer
:param attributes: bitwise AND of the EFI attributes this variable will
have set'

def create_variable(self, name, data, guid=None, attributes=None):

    if (not self.check_basic_structure()):
        return False
    var = EfiVar(name, data, guid, attributes)
    f = open(self.NEW_VAR, 'w')
    f.write(var.get_packed())
    return True
