code: def _get_pattern(self, pys_style):
          
  
          # Return None if there is no bgcolor
          if "bgcolor" not in pys_style:
              return
  
          pattern = xlwt.Pattern()
          pattern.pattern = xlwt.Pattern.SOLID_PATTERN
  
          bgcolor = wx.Colour()
          bgcolor.SetRGB(pys_style["bgcolor"])
          pattern.pattern_fore_colour = self.color2idx(*bgcolor.Get())
  
          return pattern
docs: Returns xlwt.pattern for pyspread style