code: def file_mode(self):
          
          fms = self.attributes['file_mode']
          eax = set()
          if isinstance(fms, six.string_types):
              fms = shlex.split(fms)
          for fm in fms:
              if fm == 'both':
                  eax.add('fpp')
                  eax.add('onefile')
              elif fm in ['fpp', 'onefile']:
                  eax.add(fm)
              else:
                  raise Exception('Invalid IOR file mode: ' + fm)
          return eax
docs: onefile, fpp, or both