def METHOD_NAME(headers_str):
    headers = {}
    if not headers_str:
        return headers
    for header in headers_str.splitlines():
        header = header.strip()
        if ":" not in header:
            continue
        header_name, header_value = [part.strip() for part in header.split(":", 1)]
        if header_name and header_value:
            headers[header_name] = header_value
    return headers