def normalize_headers(headers):
    """
    Create a dictionary of headers from:
       * A list of curl-style headers
       * None
       * a dictionary (return a *copy*).

    :param headers: List or dict of header (may also be None).
    :type headers: Iterable[string] | dict[string, string] | None
    :return: A dictionary of headers suitable for requests.
    :rtype: dict[string,string]
    """
    if headers is None:
        return {}
    elif isinstance(headers, dict):
        return headers.copy()
    else:
        result = {}
        for line in headers:
            key, sep, value = line.partition(':')
            if sep is None:
                raise Exception('Internal error - invalid header line (%s)' %
                    line)
            result[key.strip().lower()] = value.strip()
        return result
