<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _ParseStorageMediaImageOptions(self, options):
 """Parses the storage media image options. Args: options (argparse.Namespace):
 command line arguments. Raises: BadConfigOption: if the options are invalid. """

    self._partitions = getattr(options, 'partitions', None)
    if self._partitions:
      try:
        self._ParseVolumeIdentifiersString(self._partitions, prefix='p')
      except ValueError:
        raise errors.BadConfigOption('Unsupported partitions')

    self._volumes = getattr(options, 'volumes', None)
    if self._volumes:
      try:
        self._ParseVolumeIdentifiersString(self._volumes, prefix='apfs')
      except ValueError:
        raise errors.BadConfigOption('Unsupported volumes')