parameters: (body, body_pos)
docstring: Attempt to rewind body to a certain position.
      Primarily used for request redirects and retries.
  
      :param body:
          File-like object that supports seek.
  
      :param int pos:
          Position to seek to in file.
docstring_summary: Attempt to rewind body to a certain position.
      Primarily used for request redirects and retries.
docstring_tokens: Attempt to rewind body to a certain position . Primarily used for request redirects and retries .
function: def rewind_body(body, body_pos):
      """
      Attempt to rewind body to a certain position.
      Primarily used for request redirects and retries.
  
      :param body:
          File-like object that supports seek.
  
      :param int pos:
          Position to seek to in file.
      """
      body_seek = getattr(body, "seek", None)
      if body_seek is not None and isinstance(body_pos, integer_types):
          try:
              body_seek(body_pos)
          except (IOError, OSError):
              raise UnrewindableBodyError(
                  "An error occurred when rewinding request body for redirect/retry."
              )
      elif body_pos is _FAILEDTELL:
          raise UnrewindableBodyError(
              "Unable to record file position for rewinding "
              "request body during a redirect/retry."
          )
      else:
          raise ValueError(
              "body_pos must be of type integer, instead it was %s." % type(body_pos)
          )
function_tokens: def rewind_body ( body , body_pos ) : body_seek = getattr ( body , "seek" , None ) if body_seek is not None and isinstance ( body_pos , integer_types ) : try : body_seek ( body_pos ) except ( IOError , OSError ) : raise UnrewindableBodyError ( "An error occurred when rewinding request body for redirect/retry." ) elif body_pos is _FAILEDTELL : raise UnrewindableBodyError ( "Unable to record file position for rewinding " "request body during a redirect/retry." ) else : raise ValueError ( "body_pos must be of type integer, instead it was %s." % type ( body_pos ) )