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.

def get_method_map(self, viewset, method_map):
        """
        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.
        """

        bound_methods = {}

        for method, action in method_map.items():
            if hasattr(viewset, action):
                bound_methods[method] = action

        return bound_methods