def _get_data_bytes_or_stream_only(param_name, param_value):
if param_value is None:<EOL><INDENT>return b'<STR_LIT>'<EOL><DEDENT>if isinstance(param_value, bytes) or hasattr(param_value, '<STR_LIT>'):<EOL><INDENT>return param_value<EOL><DEDENT>raise TypeError(_ERROR_VALUE_SHOULD_BE_BYTES_OR_STREAM.format(param_name))<EOL>
Validates the request body passed in is a stream/file-like or bytes
    object.