def create_helpingmaterial(project_id, info, media_url=None, file_path=None):
try:<EOL><INDENT>helping = dict(<EOL>project_id=project_id,<EOL>info=info,<EOL>media_url=None,<EOL>)<EOL>if file_path:<EOL><INDENT>files = {'<STR_LIT:file>': open(file_path, '<STR_LIT:rb>')}<EOL>payload = {'<STR_LIT>': project_id}<EOL>res = _pybossa_req('<STR_LIT>', '<STR_LIT>',<EOL>payload=payload, files=files)<EOL><DEDENT>else:<EOL><INDENT>res = _pybossa_req('<STR_LIT>', '<STR_LIT>', payload=helping)<EOL><DEDENT>if res.get('<STR_LIT:id>'):<EOL><INDENT>return HelpingMaterial(res)<EOL><DEDENT>else:<EOL><INDENT>return res<EOL><DEDENT><DEDENT>except:  <EOL><INDENT>raise<EOL><DEDENT>
Create a helping material for a given project ID.

    :param project_id: PYBOSSA Project ID
    :type project_id: integer
    :param info: PYBOSSA Helping Material info JSON field
    :type info: dict
    :param media_url: URL for a media file (image, video or audio)
    :type media_url: string
    :param file_path: File path to the local image, video or sound to upload. 
    :type file_path: string
    :returns: True -- the response status code