<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_editor_cmd_from_environment():
 """ Gets and editor command from environment variables. It first tries $VISUAL, then $EDITOR, following the same order git uses when it looks up edits. If neither is available, it returns None. """

    result = os.getenv(ENV_VISUAL)
    if (not result):
        result = os.getenv(ENV_EDITOR)
    return result