def modify_requirements(requirements):
    """Function modify requirements if necessary.
    Example: Graph with only one primary node should consists of only one primary node
    without duplication, because this causes errors. Therefore minimum and maximum arity
    become equal to one.
    """
    if len(requirements.primary) == 1 and requirements.max_arity > 1:
        requirements.min_arity = requirements.max_arity = 1

    return requirements