You do have to be a bit careful with the terminology.
Each buffer has a single "local keymap", and therefore it's sensible to avoid using that terminology to refer to other keymaps.
current-local-map is a built-in function in `C source code'.
Return current buffer's local keymap, or nil if it has none.
Normally the local keymap is set ...
The typical way this is done is by assigning the custom commands to keyboard shortcuts of a given major-mode; e.g.,
add to your Emacs init file
;; Add commands to python mode
and then either
(eval-after-load "python-mode" '(progn
(define-key python-mode-map [f5] 'python-insert-quote)
(define-key python-mode-map [f6] 'python-...
Not too sure what you're asking. But it sounds like the answer is to bind your key in the major mode's keymap, not in the global-map.
For example, if the keymap for your Python mode is python-mode-map then do this:
(define-key python-mode-map (kbd "C-x C-e") 'python-shell-send-region)