<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_custom_color_config_from_egrc(config):
 """ Get the ColorConfig from the egrc config object. Any colors not defined will be None. """

    pound = _get_color_from_config(config, CONFIG_NAMES.pound)
    heading = _get_color_from_config(config, CONFIG_NAMES.heading)
    code = _get_color_from_config(config, CONFIG_NAMES.code)
    backticks = _get_color_from_config(config, CONFIG_NAMES.backticks)
    prompt = _get_color_from_config(config, CONFIG_NAMES.prompt)
    pound_reset = _get_color_from_config(config, CONFIG_NAMES.pound_reset)
    heading_reset = _get_color_from_config(
        config,
        CONFIG_NAMES.heading_reset
    )
    code_reset = _get_color_from_config(config, CONFIG_NAMES.code_reset)
    backticks_reset = _get_color_from_config(
        config,
        CONFIG_NAMES.backticks_reset
    )
    prompt_reset = _get_color_from_config(config, CONFIG_NAMES.prompt_reset)

    result = ColorConfig(
        pound=pound,
        heading=heading,
        code=code,
        backticks=backticks,
        prompt=prompt,
        pound_reset=pound_reset,
        heading_reset=heading_reset,
        code_reset=code_reset,
        backticks_reset=backticks_reset,
        prompt_reset=prompt_reset
    )

    return result