<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _is_allowed_command(self, command):
 """Checking if the given command is allowed on a given endpoint."""

        cmds = self._meta_data['allowed_commands']
        if command not in self._meta_data['allowed_commands']:
            error_message = "The command value {0} does not exist. " \
                            "Valid commands are {1}".format(command, cmds)
            raise InvalidCommand(error_message)