code: def get_method_map(self, viewset, method_map):
          
  
          bound_methods = {}
  
          for method, action in method_map.items():
              if hasattr(viewset, action):
                  bound_methods[method] = action
  
          return bound_methods
docs: Given a viewset, and a mapping of http methods to actions, return a new mapping which only
          includes any mappings that are actually implemented by the viewset.