<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scan_for_spec(keyword):
 """ Attempt to return some sort of Spec from given keyword value. Returns None if one could not be derived. """

    # Both 'spec' formats are wrapped in parens, discard
    keyword = keyword.lstrip('(').rstrip(')')
    # First, test for intermediate '1.2+' style
    matches = release_line_re.findall(keyword)
    if matches:
        return Spec(">={}".format(matches[0]))
    # Failing that, see if Spec can make sense of it
    try:
        return Spec(keyword)
    # I've only ever seen Spec fail with ValueError.
    except ValueError:
        return None