def extract_capabilities(text):
    if not "\0" in text:
        return text, []
    text, capabilities = text.rstrip().split("\0")
    return (text, capabilities.strip().split(" "))
Extract a capabilities list from a string, if present.
dataset/ETHPy150Open natestedman/Observatory/observatory/lib/dulwich/protocol.py/extract_capabilities