def species_as_str(class_name, id, label, smiles, inchi, inchi_key):
    """
    A helper function for generating a user-friendly string representation of a Species or NonPhysicalSpecies object.
    """
    str_ = f"<{class_name}("
    str_ += f"id={id}"
    if label is not None and label:
        str_ += f", label={label}"
    if smiles is not None and smiles:
        str_ += f", smiles={smiles}"
    elif inchi is not None and inchi:
        str_ += f", inchi={inchi}"
    elif inchi_key is not None and inchi_key:
        str_ += f", inchi_key={inchi_key}"
    str_ += ")>"
    return str_