code: def _extract_filename(self, flagfile_str):
      
      if flagfile_str.startswith('--flagfile='):
        return os.path.expanduser((flagfile_str[(len('--flagfile=')):]).strip())
      elif flagfile_str.startswith('-flagfile='):
        return os.path.expanduser((flagfile_str[(len('-flagfile=')):]).strip())
      else:
        raise _exceptions.Error(
            'Hit illegal --flagfile type: %s' % flagfile_str)
docs: Returns filename from a flagfile_str of form -[-]flagfile=filename.
  
      The cases of --flagfile foo and -flagfile foo shouldn't be hitting
      this function, as they are dealt with in the level above this
      function.
  
      Args:
        flagfile_str: str, the flagfile string.
  
      Returns:
        str, the filename from a flagfile_str of form -[-]flagfile=filename.
  
      Raises:
        Error: Raised when illegal --flagfile is provided.