def write_objs2(fpath, *objs_list, **kwargs):
mode = '<STR_LIT:wb>'<EOL>if kwargs.get('<STR_LIT>', True):<EOL><INDENT>ofs = gzip.open(fpath, mode)<EOL><DEDENT>else:<EOL><INDENT>ofs = open(fpath, mode)<EOL><DEDENT>with ofs:<EOL><INDENT>ostream = stream.open(fileobj=ofs, mode='<STR_LIT:wb>',<EOL>buffer_size=(len(objs_list)//<NUM_LIT:2>), **kwargs)<EOL>ostream.write(*objs_list)<EOL>ostream.close()<EOL><DEDENT>
Write protobuf message objects into the file w/o using `with` statement.

    It writes half of them in one group, and then the other half in another one
    by setting buffer size to half of the object list size.

    NOTE: Does the same as `write_objs1`.

    Args:
        fpath (string): path of the file to be written.
        objs_list (*protobuf.message.Message): list of objects to be written.