<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_ckw_span(fulltext, spans):
 """Return the span of the composite keyword if it is valid."""

    _MAXIMUM_SEPARATOR_LENGTH = max(
        [len(_separator)
         for _separator in
         current_app.config["CLASSIFIER_VALID_SEPARATORS"]]
    )
    if spans[0] < spans[1]:
        words = (spans[0], spans[1])
        dist = spans[1][0] - spans[0][1]
    else:
        words = (spans[1], spans[0])
        dist = spans[0][0] - spans[1][1]

    if dist == 0:
        # Two keywords are adjacent. We have a match.
        return (min(words[0] + words[1]),
                max(words[0] + words[1]))  # FIXME: huh, this is a bug?! a sum?
    elif dist <= _MAXIMUM_SEPARATOR_LENGTH:
        separator = fulltext[words[0][1]:words[1][0] + 1]
        # Check the separator.
        if separator.strip() in current_app.config[
                "CLASSIFIER_VALID_SEPARATORS"]:
            return (min(words[0] + words[1]), max(words[0] + words[1]))

    # There is no inclusion.
    return None