code: def create_struct(name):
      
      sid = idc.GetStrucIdByName(name)
      if sid != idaapi.BADADDR:
          # The struct already exists.
          raise exceptions.SarkStructAlreadyExists("A struct names {!r} already exists.".format(name))
  
      sid = idc.AddStrucEx(-1, name, 0)
      if sid == idaapi.BADADDR:
          raise exceptions.SarkStructCreationFailed("Struct creation failed.")
  
      return sid
docs: Create a structure.
  
      Args:
          name: The structure's name
  
      Returns:
          The sturct ID
  
      Raises:
          exceptions.SarkStructAlreadyExists: A struct with the same name already exists
          exceptions.SarkCreationFailed:  Struct creation failed