def METHOD_NAME(key):
    """
    This function will remove header and footer from key (like:
    -----BEGIN RSA PRIVATE KEY-----
    -----END RSA PRIVATE KEY-----
    ) and return the key on one line.
    Returns:
        string: one line key string without header and footer
    """
    key_lines = key.strip().split("\n")
    if "-----BEGIN" in key_lines[0]:
        key_lines = key_lines[1:]
    if "-----END" in key_lines[-1]:
        key_lines = key_lines[:-1]
    return "".join(key_lines)