<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def submit_sample(self, sample, cookbook=None, params={}, _extra_params={}):
 """ Submit a sample and returns the submission id. Parameters: sample: The sample to submit. Needs to be a file-like object or a tuple in the shape (filename, file-like object). cookbook: Uploads a cookbook together with the sample. Needs to be a file-like object or a tuple in the shape (filename, file-like object) params: Customize the sandbox parameters. They are described in more detail in the default submission parameters. Example: import jbxapi joe = jbxapi.JoeSandbox() with open("sample.exe", "rb") as f: joe.submit_sample(f, params={"systems": ["w7"]}) Example: import io, jbxapi joe = jbxapi.JoeSandbox() cookbook = io.BytesIO(b"cookbook content") with open("sample.exe", "rb") as f: joe.submit_sample(f, cookbook=cookbook) """

        self._check_user_parameters(params)

        files = {'sample': sample}
        if cookbook:
            files['cookbook'] = cookbook

        return self._submit(params, files, _extra_params=_extra_params)