def parse_options():
    """Specify the command line options to parse.
    
    Returns
    -------
    opts : optparse.Values instance
        Contains the option values in its 'dict' member variable.
    
    args[0] : string or file-handler
        The name of the file storing the data-set submitted
        for Affinity Propagation clustering.
    """

    parser = optparse.OptionParser(
                        usage = "Usage: %prog [options] file_name\n\n"
                        "file_name denotes the path where the data to be "
                        "processed by affinity propagation clustering is stored"
                        )
    parser.add_option('-m', '--multiprocessing', dest = 'count', 
                      default = multiprocessing.cpu_count(), type = 'int', 
                      help = ("The number of processes to use (1..20) " 
                              "[default %default]"))
    parser.add_option('-f', '--file', dest = 'hdf5_file', default = None,
                     type = 'str', 
                     help = ("File name or file handle of the HDF5 "
                             "data structure holding the matrices involved in "
                             "affinity propagation clustering "
                             "[default %default]"))
    parser.add_option('-s', '--similarities', dest = 'similarities', 
                      default = False, action = 'store_true',
                      help = ("Specifies if a matrix of similarities "
                              "has already been computed; only makes sense "
                              "with -f or --file in effect [default %default]"))
    parser.add_option('-i', '--iterations', dest = 'max_iter', 
                      default = 200, type = 'int', 
                      help = ("The maximum number of message passing "   
                              "iterations undergone before affinity "
                              "propagation returns, having reached "
                              "convergence or not [default %default]"))
    parser.add_option('-c', '--convergence', dest = 'convergence_iter', 
                      default = 15, type = 'int', 
                      help = ("Specifies the number of consecutive "
                              "iterations without change in the number "
                              "of clusters that signals convergence "
                              "[default %default]") )
    parser.add_option('-p', '--preference', dest = 'preference', 
                      default = None, type = 'float', 
                      help = ("The preference parameter of affinity "
                              "propagation [default %default]"))
    parser.add_option('-d', '--damping', dest = 'damping',
                      default = 0.5, type = 'float',
                      help = ("The damping parameter of affinity " 
                              "propagation; must be within 0.5 and 1.0 "
                              "[default %default]"))
    parser.add_option('-v', '--verbose', dest = 'verbose', 
                      default = False, action = 'store_true', 
                      help = ("Turns on the display of messaging regarding " 
                              "the status of the various stages of affinity "
                              "propagation clustering currently ongoing "
                              "on the user-specified data-set "
                              "[default %default]"))
                    
    opts, args = parser.parse_args()
    
    if len(args) == 0:
        parser.error('A data file must be specified')
    
    if opts.similarities and (opts.hdf5_file is None):
        parser.error("Option -s is conditional on -f")
    
    if not (1 <= opts.count <= 20):
        parser.error("The number of processes must range "
                     "from 1 to 20, inclusive")
                     
    if opts.max_iter <= 0:
        parser.error("The number of iterations must be "
                     "a non-negative integer")
                                      
    if opts.convergence_iter >= opts.max_iter:
        parser.error("The number of iterations signalling convergence "
                     "cannot exceed the maximum number of iterations possibly "
                     "required")
                     
    if not (0.5 <= opts.damping <= 1.0):
        parser.error("The damping parameter is restricted to values "
                     "between 0.5 and 1.0")
        
    return opts, args[0]