<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_shares(self, path='', **kwargs):
 """Returns array of shares :param path: path to the share to be checked :param reshares: (optional, boolean) returns not only the shares from the current user but all shares from the given file (default: False) :param subfiles: (optional, boolean) returns all shares within a folder, given that path defines a folder (default: False) :param shared_with_me: (optional, boolean) returns all shares which are shared with me (default: False) :returns: array of shares ShareInfo instances or empty array if the operation failed :raises: HTTPResponseError in case an HTTP error status was returned """

        if not (isinstance(path, six.string_types)):
            return None

        data = 'shares'
        if path != '':
            data += '?'
            path = self._encode_string(self._normalize_path(path))
            args = {'path': path}
            reshares = kwargs.get('reshares', False)
            if isinstance(reshares, bool) and reshares:
                args['reshares'] = reshares
            subfiles = kwargs.get('subfiles', False)
            if isinstance(subfiles, bool) and subfiles:
                args['subfiles'] = str(subfiles).lower()

            shared_with_me = kwargs.get('shared_with_me', False)
            if isinstance(shared_with_me, bool) and shared_with_me:
                args['shared_with_me'] = "true"
                del args['path']

            data += parse.urlencode(args)

        res = self._make_ocs_request(
            'GET',
            self.OCS_SERVICE_SHARE,
            data
        )

        if res.status_code == 200:
            tree = ET.fromstring(res.content)
            self._check_ocs_status(tree)
            shares = []
            for element in tree.find('data').iter('element'):
                '''share_attr = {}
                for child in element:
                    key = child.tag
                    value = child.text
                    share_attr[key] = value
                shares.append(share_attr)'''
                shares.append(self._get_shareinfo(element))
            return shares
        raise HTTPResponseError(res)