def _AttachFile(self, body, name, filename, content):
    """Adds a file to multipart HTTP body.

    Args:
      body: HTTP body to append the parameter to.
      name: Name of the parameter.
      filename: Filename of the attached file.
      content: Content of the file to attach.
    Returns:
      New HTTP body.
    """
    body += '--%s\r\n' % self.boundary
    body += 'Content-Disposition: form-data; name="%s"; filename="%s"\r\n' % (
        name, filename)
    body += 'Content-Type: application/octet-stream\r\n'
    body += '\r\n'
    body += '%s\r\n' % content
    return body
dataset/ETHPy150Open GoogleCloudPlatform/Data-Pipeline/app/src/hadoop/hadoop_csv_transformer.py/HadoopCsvTransformer._AttachFile/original