def read_commands_from_buffer(self):
        received_commands = 0
        while True:
            cmd_type, cmd_args, cmd_len = self._unpack_command(self._incoming_buffer)
            if not cmd_len:
                break

            received_commands += 1

            # Store our command on the command queue
            # Move the self._incoming_buffer forward by the number of bytes we just read
            self._incoming_commands.append((cmd_type, cmd_args))
            self._incoming_buffer = self._incoming_buffer[cmd_len:]

        return received_commands
Given an instance of a serializer field, return a dictionary
dataset/ETHPy150Open YelpArchive/python-gearman/gearman/connection.py/GearmanConnection.read_commands_from_buffer--crossover with--dataset/ETHPy150Open django-json-api/django-rest-framework-json-api/rest_framework_json_api/metadata.py/JSONAPIMetadata.get_field_info