<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resolve_bot_file_id(file_id):
 """ Given a Bot API-style `file_id`, returns the media it represents. If the `file_id` is not valid, ``None`` is returned instead. Note that the `file_id` does not have information such as image dimensions or file size, so these will be zero if present. For thumbnails, the photo ID and hash will always be zero. """

    data = _rle_decode(_decode_telegram_base64(file_id))
    if not data or data[-1] == b'\x02':
        return None

    data = data[:-1]
    if len(data) == 24:
        file_type, dc_id, media_id, access_hash = struct.unpack('<iiqq', data)

        if not (1 <= dc_id <= 5):
            # Valid `file_id`'s must have valid DC IDs. Since this method is
            # called when sending a file and the user may have entered a path
            # they believe is correct but the file doesn't exist, this method
            # may detect a path as "valid" bot `file_id` even when it's not.
            # By checking the `dc_id`, we greatly reduce the chances of this
            # happening.
            return None

        attributes = []
        if file_type == 3 or file_type == 9:
            attributes.append(types.DocumentAttributeAudio(
                duration=0,
                voice=file_type == 3
            ))
        elif file_type == 4 or file_type == 13:
            attributes.append(types.DocumentAttributeVideo(
                duration=0,
                w=0,
                h=0,
                round_message=file_type == 13
            ))
        # elif file_type == 5:  # other, cannot know which
        elif file_type == 8:
            attributes.append(types.DocumentAttributeSticker(
                alt='',
                stickerset=types.InputStickerSetEmpty()
            ))
        elif file_type == 10:
            attributes.append(types.DocumentAttributeAnimated())

        return types.Document(
            id=media_id,
            access_hash=access_hash,
            date=None,
            mime_type='',
            size=0,
            thumbs=None,
            dc_id=dc_id,
            attributes=attributes,
            file_reference=b''
        )
    elif len(data) == 44:
        (file_type, dc_id, media_id, access_hash,
            volume_id, secret, local_id) = struct.unpack('<iiqqqqi', data)

        if not (1 <= dc_id <= 5):
            return None

        # Thumbnails (small) always have ID 0; otherwise size 'x'
        photo_size = 's' if media_id or access_hash else 'x'
        return types.Photo(
            id=media_id,
            access_hash=access_hash,
            file_reference=b'',
            date=None,
            sizes=[types.PhotoSize(
                type=photo_size,
                location=types.FileLocationToBeDeprecated(
                    volume_id=volume_id,
                    local_id=local_id
                ),
                w=0,
                h=0,
                size=0
            )],
            dc_id=dc_id,
            has_stickers=None
        )