def get_stoichiometry_from_str(input_str):
    """ Get the stoichiometry from individual parts of the reaction
    Parameters
    ----------
    input_str

    Returns
    -------
    dict -  keys: str of metabolite ids
            values: str of stoichiometric coefficient
    """
    split_str = input_str.split(' ')
    if len(split_str) == 1:
        if split_str[0] == '':
            return ()
        else:
            return split_str[0], None
    elif len(split_str) == 2:
        try:
            float(split_str[0])
        except ValueError:
            raise ValueError(
                'The first part of the reaction substring {0} i.e. {1} does not evaluate to a float'
                .format(input_str, split_str[0]))
        else:
            coefficient = split_str[0]
    elif len(split_str) > 2:
        raise ValueError(
            'The reaction substring {0} contains more than 1 space characters'
            .format(input_str))
    return split_str[1], coefficient
