def validate_bandskpoints(value, _):
    """
    Validate bandskpoints input port. Checks the kpoints list is set.
    """
    if value:
        try:
            value.get_kpoints()
        except AttributeError:
            return "bandskpoints requires a list of kpoints, use `set_kpoints`."